Hi, I just wanna make sure that I'm not missing something in my thoughts.
There are tools written specially for backup/restore of victoriametrics:
Both of them support local filesystem folder as target, but what I found is that result of these two commands:
# ./vmbackup-prod -storageDataPath /mnt/vmstorage -snapshotName HERE_IS_SNAPSHOT_NAME -dst fs:///root/backup_vmbackup
# ./vmrestore-prod -src fs:///root/backup_vmbackup/ -storageDataPath /root/backup_restored
is identical to simple rsync:
# rsync -L -r /mnt/vmstorage/snapshots/HERE_IS_SNAPSHOT_NAME/ /root/backup_rsync
Here is diff result:
# diff -qr /root/backup_vmrestored/ /root/backup_rsync/
Only in /root/backup_rsync/data: big
Only in /root/backup_vmrestored/: flock.lock
Does that mean that for local fs I can get rid of vmbackup and vmrestore tools and just use rsync to copy snapshots instead? Am I right that vmbackup/vmrestore main purpose is copying data to s3/gcs, not local fs?
My understanding is that the rsync --delete flag is important! MergeTree structures may delete files over time, and you do not want those to stick around in your backup.
Another difference is that vmbackup breaks up larger files into smaller files before transferring. This ensures that if the transfer is interrupted that you do not need to send a 5 TB file over from scratch.
Otherwise, yeah, it also seems to me like there are lots of similarities between it and rsync.
@anjakefala , thanks for great answer to the original question! The answer is 100% correct.
Most helpful comment
My understanding is that the
rsync --deleteflag is important! MergeTree structures may delete files over time, and you do not want those to stick around in your backup.Another difference is that vmbackup breaks up larger files into smaller files before transferring. This ensures that if the transfer is interrupted that you do not need to send a 5 TB file over from scratch.
Otherwise, yeah, it also seems to me like there are lots of similarities between it and rsync.