Search code examples
filesystemsrsyncfat32

rsync on fat32 and ntfs


A little background: I have tried to use rsync to backup my wife's home directory to an external usb drive with the command

rsync -va /home/wife /run/media/wife

but kept getting error messages that mkstemp failed, and that rsync failed to set times, becuase of a read-only filesystem. Worse, it seems that rsync is unable to tell when files don't need syncing, and winds up copying a lot of stuff it doesn't need to, resulting in rediculously slow backup times.

So I tried using rsync -rtvO instead, based on this guy's advice. Okay, no more warnings, but the backups still seem too slow, and esp on big media files that already exists -- i.e. it's still copying stuff unnecessarily.

  1. Is my analysis correct?
  2. Is there a workaround?
  3. Will the problem be fixed if I use an NTFS drive for here backups?

I could of course use a linux filesytem, but on rare occasions she would like to be able to take the drive to work and access it from the Windows machines there.


Solution

    1. Try using --modify-window=1

      In particular, when transferring to or from an MS Windows FAT filesystem (which represents times with a 2-second resolution), --modify-window=1 is useful (allowing times to differ by up to 1 second).

      https://download.samba.org/pub/rsync/rsync.html

    2. You could also try using --size-only

      skip files that match in size

    For rsync to FAT, this is what I use and it seems to work pretty well:

    rsync -rtv --modify-window=1 source/ destination/
    

    Source: https://serverfault.com/a/144475/58568