0

I suspect I already know the answer to this one, but I'd like to confirm. I manually transferred files and folders from one virtual machine to another, because at the time, I hadn't figured out rsync properly. Now when I compare files within a folder on the old VM (say [email protected]:/home/myoldfolder) with the exact same (manually transferred) files on the new VM (say [email protected]:/home/mynewfolder) by running

rsync -a -v -c --dry-run [email protected]:/home/myoldfolder /home/mynewfolder

rsync shows the same files in the incremental file list.

Instead, when I synced the same files to another new folder on the new VM using rsync and then repeated the comparison, no files were shown in the incremental file list, presumably because rysnc identifies them as being the exact same files.

Is this because file fingerprints change if the files haven't been synced using rsync? I hope my question is clear.

Thanks!

1 Answer 1

0

For identifying changes in files, rsync relies on

  • existence of file (non-exitent files on the target are transferred)
  • size
  • modification time

if any of those have mismatches, the transfer will be done. Now if you copy "manually", specifically the modification time might not be maintained on the target system.

You could use e.g. -c in rsync to force a checksum-based comparison (slow as each file is checksummed on either side), --size-only to skip the modification time test, or -u which updates only, i.e. files that are newer on the destination system are not touched.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .