0

I've recently discovered rsync and started to use it. I want to compare files based on filename & filesize only. If both match, then skip, if different size, then keep dest version (renamed) and copy from source.

I gave it a try and it failed to create backup file with options rsync --size-only -avbr for one file with same name and different size, just replacing it (source was NTFS, destination exFAT). I created test environment on tmpfs drive, first with dummy files - backup was created, then actually copied that two files and again backup copy was created with ~ at the end.

I did several tries with original locations to be sure that issue persists, including omitting a flag with thoughts that maybe on non Linux file systems rsync cannot properly read some properties. And creating small file with name 12345678 and small text type content - still same issue - just replacement.

Why rsync does not keep original file in my case? I have two guesses: either it still somehow uses timestamp if backup option is added to size-only and just copying files from non-Linux file systems to tmpfs mangled some important details or rsync cannot be expected to work correctly with non-Linux native file systems.

System Linux Mint 19. NTFS and exFAT mounted type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

0

The "issue" was not with rsync but with Nemo file manager that for some reason considers files with ~ at the end created as backup as hidden and does not show them (shows with show hidden files option). Strange IMHO behavior as hidden files are those starting with dot, as e.g. stated here https://askubuntu.com/questions/232649/how-to-show-or-hide-a-hidden-file.

| improve this answer | |
  • maybe the question is not worth to keep, but I could not decide for myself to delete it. – Marisha Jan 2 at 8:37

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.