I try to use rsync to backup a virtual box vm. This does not succeed: the disk image is not updated. I tried it on the vdi file alone as a test. The virtual machine was not running. The file is very large so I use the --inplace option to save diskspace and speed it up. I tested two ways to do this:
- Using a rsync daemon running on the destination.
- Using NFS to the same system.
The command for option 1 was:
rsync -av --delete --partial --inplace --append --progress /src/integration/vdi rsync://rsyncuser@destserver/dest/integration.vdi
The command used for option 2 was:
rsync -av --delete --partial --inplace --append --progress /src/integration.vdi /nfsserver/dest/integration.vdi
Integration.vdi was the same size on both systems, but the modification time on the destination was older.
In both scenarios rsync behaved as if the files were identical, but cmp on both files (after the rsync) showed they were different.
What is going on here? The documentation says that rsync uses file time and file size to determine if a file needs updating. The size is identical, but the destination is older, so I would think the file needs updating.