Linux NTFS to NTFS rsync repeatedly recopying files

linuxntfsrsync

I wish to backup data mounted on an NTFS partition of a linux machine to the NTFS partition of another linux machine. The local NTFS drive is mounted with all files owned by root.root, but the remote NTFS drive is mounted using plugdev (so file ownership is root.plugdev).

rsync can apparently not copy owner/group and permission info in this situation, so I have been trying to run

sudo rsync -rltDvO --delete /ntfs/src/ user@remote.example.com:/ntfs/dest/

However, every time I run this command, it re-copies ALL the files, rather than just transferring the changed files. I have tried using the –modify-window flag, but that hasn't helped either.

Update: it is not recopying all the files, rather it is recalculating the checksums (or doing some other processing, causing the filename to be printed) for each file. This is opposed to what happens between to e2fs drives, where no filenames are printed if no changes have been made to the source and destination since the last rsync. I am guessing this processing is because the timestamps are not available on NTFS(?)

Next update: Permissions certainly seem to be a part of it: first, also using -u as an rsync flag stopped the processing of all the files on the destination, but this is not what I want. Secondly, if I use an account with root access (and rsync flags -avz) on the remote machine, I can actually change the timestamps on files and directories. However, some files continue to be recopied, and the –modify-window seems to help for that somewhat (but not completely, it seems – I'm still experimenting to find out why.)

Best Answer

As per my second update, the permissions of my user did not allow me to set times. Running the rsync using the root account on the destination machine, along with --modify-window=5 gave me suitable behaviour. (If you don't have root access on the destination, the -u flag could help, but only if you're sure no-one will change the files on the remote system.)

Related Topic