[PVE-User] vzmigrate: use --sparse on the first rsync
John O. Stevens
john_o.stevens at yahoo.com
Mon Sep 19 14:31:20 CEST 2011
I thought that vzdump was called during migration of containers,
but it seems it's not, so I added the same option to the first
rsync in vzmigrate, to help with sparse files during a migration.
I tested it with:
vzmigrate -r no --keep-dst -v host2 CTID
And with this patch, sparse files are not expanded, as expected.
jos
--- vzmigrate.orig 2011-09-19 14:14:43.000000000 +0200
+++ vzmigrate 2011-09-19 14:16:37.000000000 +0200
@@ -443,7 +443,7 @@
fi
log 1 "Syncing private"
-$RSYNC "$VE_PRIVATE" "root@$host:${VE_PRIVATE%/*}"
+$RSYNC --sparse "$VE_PRIVATE" "root@$host:${VE_PRIVATE%/*}"
# Ignore rsync error 24 "Partial transfer due to vanished source files"
if [ $? != 24 ] && [ $? != 0 ]; then
log 0 "Failed to sync container private areas"
More information about the pve-user
mailing list