You are not logged in.
So I've had problems with all the gui samba clients, they usually can't find shares at all for some reason. The fuse ones seem to work, but sometimes they just disconnect and sometimes mount nothing. Mount cifs works, but without unicode support. Mounting in general is a pain since you need root and an empty directory and all that.
Smbclient is the thing that seems to work the best, and I like the idea. But I have problems with it, I probably just don't know how to use it right.
By typing "tarmode", "recurse" and "prompt" I can use mget to recursivly download directories from the samba server. However mput never seems to work.
If I typed "mask", "recurse" and "prompt", it seemed to work, however I noticed there is a slight filesize difference between the client and server. On the client there were more files, so I guess some files didn't get to the other side, and maybe even a file got cutoff in the middle.
The funny thing is, mput just stopped working. Even in that same smbclient session I couldn't mput another directory after that one, and if I restart smbclient and type "mask", "recurse", and "prompt" again nothing happens when I try to send another directory with mput.
What is the correct way to recursively copy a directory to the samba server? (like cp -r)
(Also if the way I use mget is wrong please correct me. It hasn't failed me yet, so I don't think so, but just to be safe.)
I tried reading the man pages, but they are pretty cryptic.
Offline
Hi,
This is probably too late to be useful but I found this in a google search when having the same problem and thought I'd post the way I could ultimately accomplish this:
See http://www.techsneeze.com/smbclient-to- … ows-server
/usr/local/bin/smbclient //servername/share -A /home/username/.smbclient -c "cd backup; lcd /home/username/files; prompt; recurse; mput *; exit;"
I found that mput does not actually recurse if you specify a directory name. You need to lcd into the root of the directory you want to copy from and do mput *
Offline
Moderator comment: This topic is a bit old, but since there was no other discussion and this seems to be an answer to the problem, I am okay with this. If the original poster continues this thread, fine. Things have progressed since the original post, so if anyone has a similar problem, please start a new thread.
Leaving open for now.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline