X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=BackupPC_ovz;h=2e0db7cb827824dccc80cd21d64269c96f915703;hb=c9ba66d43a5b49494c2fb142f2d36718a1636be3;hp=830de2cc98bb50d671b783d2d69d4d477911a970;hpb=f35dbbee7d25a91f62f22bc3a77bde8d6b75b99b;p=ovzbpc.git diff --git a/BackupPC_ovz b/BackupPC_ovz index 830de2c..2e0db7c 100755 --- a/BackupPC_ovz +++ b/BackupPC_ovz @@ -116,7 +116,7 @@ sub loadVeList() close($fh); } -# For use on the HN +# For use on the HN. Derive the VE record from its VEID. sub localVe($) { my ($veid) = @_; @@ -341,7 +341,8 @@ sub saveConfigs($) my ($ve) = @_; die "No VE record for saveConfigs" if (!defined($ve)); - # Copy configuration and other scripts belonging to VE into VE's snapshot + # Copy configuration and other scripts belonging to VE into VE's snapshot. + # Do this in a manner similar to that supported by vzdump for consistency. my $snapprivate = $ve->{'snapprivate'}; mkpath "$snapprivate/etc/vzdump"; my $conffile = $ve->{'conffile'}; @@ -432,8 +433,12 @@ sub runClient($) die "Failed to make snapshot of filesystem for VE $veid" if (!defined($ve->{'snaproot'})); + # Save the VE configuration from its hosted HN into the filesystem. If + # /etc is backed up, so will the VE configuration. + saveConfigs($ve); + # Make and exec the backup command. Do it in a chroot to the snapshot - # of the VE's root dir so that any relative path information in the + # of the VEs root dir so that any relative path information in the # backup command is accurate. This does mean that each VE needs rsync, # etc. my $cmd = "chroot ".$ve->{'snapprivate'}." ".join(' ', @ARGV);