rsync backup to cifs / smb / samba share

I was using rsync to backup unix / linux directories to a mounted cifs share. (This is a samba share mounted under Linux). The server is Ubuntu. Problem I had was rsync kept copying the same files over again even though they did not change. The solution was to add –modify-window=2 This adds a 2 second window to the rsync compare. Fat file systems write timestamps weird and this corrects for the problem. I also needed to modify the rsync command and change it from rsync -a to rsync -rltDv fat also does not keep owner or group permissions. A big thanks to my friend, I’ll call him T for helping me figure this one out!

1 thought on “rsync backup to cifs / smb / samba share

  1. Thanks for the tip. I found tried this on my router TomatoUSB based router, and I found I had to run as root. e.g.

    sudo rsync -rltDP –modify-window=2 /source-dir/ /cifs2/dest-dir/

    Where cifs2 is a samba mounted director…

    When rsync runs any other user I get a permission denied on the set time operation.

Leave a Reply

Your email address will not be published. Required fields are marked *