1

I have two servers, let's call them sA and sB. I need to backup data (several TBs) from sA to sB but because of problems with sB SSH, I'm using my local pc as "middle man". sA is a Linux server, sB is a QNAP nas.

So first I mount sB locally with

sudo mount -t cifs //sb_host/share destdir -o username=myuser,file_mode=0777,dir_mode=0777

Then I use rsync to copy files from sA to the share:

rsync -PrlH -e '/usr/bin/ssh' myremoteuser@sa_host:/dir-to-backup/ destdir

I had to remove the -a option because times and permissions couldn't be preserved. It's not a big deal (although it would be nice to fix that), but the same happens with symlinks:

rsync: symlink "symlink_file" -> "symlink_destination_file" failed: Operation not supported (95)

Can this be fixed?

  • Can't you mount the share on sB via NFS on sA? – Sven Aug 24 '16 at 9:39
  • @Sven I have connectivity problems between sA and sB. Pings going to 100% packet loss, ssh connections dropping, rsync getting stuck.. we decided to use the "middle man" until we can decommission the old sB. Just the easiest solution. I might try an NFS share if it is robust against connection drops (of up to a minute). – Fabio Aug 24 '16 at 9:45
1

I had tried "unix extensions = yes" but it didn't work - but it was just the nas overwriting the settings when restarted.

So, adding that option to the receiving server, restarting samba there and mounting share with cifs correctly handles permissions and symlinks.

0

CIFS does not support symlinks

  • This is not correct. I just solved it and adding an answer. – Fabio Aug 26 '16 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.