LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   samba/rsync file names! (https://www.linuxquestions.org/questions/linux-software-2/samba-rsync-file-names-4175545289/)

timl 06-13-2015 07:30 PM

samba/rsync file names!
 
Hi, I am planning to migrate from Centos 6 to 7. Part of my plan is to, temporarily, store my samba shares on a raspberry Pi running wheezy. My main desktop is Fedora 22.

I now have shares on both Centos and the Pi and I mount both of these on the F22 box. Initially I used rsync/ssh on F22 from the Centos share directly to the Pi (ie. bypassing samba at the Pi end). abc is the existing share which I have been using for a while, nabc is the new share on the Pi.

Quote:

rsync -r -a -v -t -e ssh /mnt/abc/ "pi@176.145.1.62:/mnt/extend/sharing/nabc/"
all good. But that isn't what I wanted. I wanted to copy from one share to the other:

Quote:

rsync -r -a -v -t /mnt/abc/ /mnt/nabc/
This sort of works BUT all the files on the Pi are created with a “\” in front of the name. Not what I was after. Any ideas why this is happening?

Cheers

berndbausch 06-14-2015 09:04 PM

I have no answer to your question, but why don't you just rsync the files from the Centos box to the Pi? No Samba needed for this.

Alternatively, on the F22:

cd /mnt/abc
find . | cpio -pdumva /mnt/nabc

(you may want to check whether other cpio options are needed)

timl 06-15-2015 03:50 AM

thanks. That does indeed copy the files across correctly. In spite of the -p option I lose the timestamps (which I would like) but this may be related to the ownership coming from groups set up on 2 different computers.

Ultimately I think the rsync suggestion will suffice.

regards


All times are GMT -5. The time now is 03:08 PM.