rsync bunch of files with space
I need to copy a bunch of files from one server to the other where most of the files and folders contain spaces. Basically I'm moving bunch of directories created by windows clients in samba file server to the new samba server. So i don't need to preserve the permissions or owners of previous samba user. I used the following command and more combinations but none of them seems to be copying files and folders with spaces.
sudo rsync -rv root@192.168.1.2:/home/users/abcd /data/home/abc |
If this is a one-off copy (as it sounds) then rsync is overkill; its main claim to fame/efficiency is only copying file changes.; in this case that's 100% anyway.
I'd just use Code:
# on target box |
Thanks for the reply. Now I've used scp and still the files and folders with space not copied. Please help me out.
|
well,.. rsync should pick up the spaces fine.
Code:
rsync -varh --progress /from/dir/ /to/dir/ |
Thanks for the command. I have already tried similar. It copy the files with blank space but permission is denied as it keep the original ownership from previous fileserver. But then I issued chmod -R and chown -R to solve the problem.
|
Hmmm just tested this (ip obscured)
Code:
scp * user@1.2.3.4:/tmp |
I see it also working with scp. Can you provide any error information? You can also use tar:
Code:
$ ssh root@1.2.3.4 tar cz -C /home/users abcd | tar xz -C /data/home/abc |
All times are GMT -5. The time now is 06:33 AM. |