I have a FreeBSD file server and I also have just setup a xUbuntu 15.10 desktop.

The desktop was previously running OS X but I backed up my files to the FreeBSD server before installing xUbuntu. After install xUbuntu, I erased the partitions on the HFS+ disk via fdisk.

I just copied back my files from the server to a local disk. But I'm experiencing weird behavior from rsync.

steps I used:

1st step: rsync -aiv --delete --progress --dry-run /server/my-stuff/ /localdisk/my-stuff/

This list all the stuff missing in the destination drive. Obviously, my localdisk is empty since I just moved to Linux.

2nd step: rsync -aiv --delete --progress /server/my-stuff/ /localdisk/my-stuff/

This then copied all my files to /localdisk/my-stuff/. As a test, I tried running the 1st step again:

3rd step: rsync -aiv --delete --progress --dry-run /server/my-stuff/ /localdisk/my-stuff/

I was expecting 0 files to be shown but it seems rsync wants to copy all the files again. I'm saying "all" just because the number of files it wants to copy is too many to count.

So any ideas on how to fix this? thanks

  • 1
    You still have --dry-run in the second command. – Henrik Mar 12 '16 at 10:33
  • thanks for the comment. copy/paste mistake. I didn't have --dry-run when I ran the rsync command the 2nd time. – mrjayviper Mar 12 '16 at 10:35

In my experience, Samba shares may adhere to the same constraints as a FAT volume, that is: the timestamps have a minimum resolution of 2 seconds. rsync doesn't know that and assumes that the file is "new" and transfers it again. Try using the --modify-window=2 option to get around that behaviour:

rsync -aiv --delete --progress --dry-run --modify-window=2 /server/my-stuff/ /localdisk/my-stuff/

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.