Sergey Shatokhin
2010-Jun-04 00:03 UTC
Backup to NTFS USB drive --compare-dest not working
When I'm running "rsync --compare-dest" on a local Linux volume (ext4) it works as expected (duplicate files not created) however when same commands with same options are run on NTFS USB drive (in my scenario below mounted to /share/external/sdt5) all the files are copied regardless if they have been updated or not. I have spent many hours trying to figure out what could be wrong and trying different options, still I have no idea how to make it work. I will appreciate any help. I have set up following directories for my test: SourceDir/ FullBackupDir/ IncBackupDir/ NtfsFullBackupDir -> /share/USBDisk2/TMP/NtfsFullBackupDir/ NtfsIncBackupDir -> /share/USBDisk2/TMP/NtfsIncBackupDir/ Following commands work as expected, the files are copied from the source directory only to the "full backup" directories and not to the "inc backup" directories: [~/test] # rsync -avh --delete SourceDir/ FullBackupDir/ [~/test] # rsync -avh --compare-dest=/root/test/FullBackupDir SourceDir/ IncBackupDir/ But for some reason following commands have different results: nothing is copied to IncBackupDir (absolutely correct behaviour!) however all files are copied from SourceDir to NtfsIncBackupDir again - why? [~/test] # rsync -avh --compare-dest=/root/test/FullBackupDir SourceDir/ IncBackupDir/ [~/test] # rsync -avh --compare-dest=/root/test/NtfsFullBackupDir SourceDir/ NtfsIncBackupDir/ Complete log is below: [~/test] # rsync -avh --delete SourceDir/ FullBackupDir/ sending incremental file list ./ 1.txt 2.txt sent 171 bytes received 53 bytes 448.00 bytes/sec total size is 6 speedup is 0.03 [~/test] # rsync -avh --compare-dest=/root/test/FullBackupDir SourceDir/ IncBackupDir/ sending incremental file list ./ sent 79 bytes received 15 bytes 188.00 bytes/sec total size is 6 speedup is 0.06 [~/test] # rsync -avh --delete SourceDir/ NtfsFullBackupDir/ sending incremental file list ./ 1.txt 2.txt sent 171 bytes received 53 bytes 89.60 bytes/sec total size is 6 speedup is 0.03 [~/test] # rsync -avh --compare-dest=/root/test/NtfsFullBackupDir SourceDir/ NtfsIncBackupDir/ sending incremental file list ./ 1.txt 2.txt sent 85 bytes received 21 bytes 212.00 bytes/sec total size is 6 speedup is 0.06 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20100604/e4282b04/attachment.html>
On Fri, 2010-06-04 at 01:03 +0100, Sergey Shatokhin wrote:> When I'm running "rsync --compare-dest" on a local Linux volume (ext4) > it works as expected (duplicate files not created) however when same > commands with same options are run on NTFS USB drive (in my scenario > below mounted to /share/external/sdt5) all the files are copied > regardless if they have been updated or not.hi, Normally, the -a option can be used to perfectly mirror the files. However, if the target filesystem does not support permissions, a different set of options should be used to avoid warnings from rsync. To synchronize data to a USB drive with a FAT filesystem, I use the -rlt options. bye, nomnex
Sergey Shatokhin
2010-Jun-04 23:58 UTC
Backup to NTFS USB drive --compare-dest not working
> if the target filesystem does not support permissions, a > different set of options should be used to avoid warnings from rsync. To > synchronize data to a USB drive with a FAT filesystem, I use the -rlt > options.Thanks nomnex, you're absolutely right! As soon as I changed -a to -rlt everything began working as expected! It must have been -pgo options that are a part of -a that gave me such problems. Thanks again, I didn't expect someone would be able to help me resolve it so quickly! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20100605/9c746ba9/attachment.html>
Reasonably Related Threads
- Help with correct text file syntax EXCLUDE/INCLUDE + OPTION
- Anyone actively using RLT for mobile phone forwarding?
- New tutorial and script for rsync resources page
- Specify Includes Only
- [Bug 13582] New: rsync filters containing multiple adjacent slashes aren't reduced to just one slash before matching