X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=ovzbpc.git;a=blobdiff_plain;f=BackupPC_ovz;h=38e888ac0016e6e96afbde72c0bc3ffa9e6562a8;hp=c6ef4bf200f1bade9170b69d76b1790262f01e67;hb=HEAD;hpb=e93c18c4abe6391b5dc7c5f47ce70fbf97880906 diff --git a/BackupPC_ovz b/BackupPC_ovz index c6ef4bf..38e888a 100755 --- a/BackupPC_ovz +++ b/BackupPC_ovz @@ -88,6 +88,8 @@ sub refreshConfig() # Write the VEs on all HNs to a config file on the BackupPC server for # later use. my @HNS = (); + + print $dbgf ": refreshConfig\n"; open my $cfg, "<$hnlistFile" || mydie "Cannot read $hnlistFile"; while (<$cfg>) { chomp; @@ -273,6 +275,7 @@ sub printVeEntry($) sub delSnapshot($) { my ($ve) = @_; + print $dbgf ": delSnapshot\n"; mydie "No VE record for delSnapshot" if (!defined($ve)); #print "delSnapshot: doing nothing for now\n"; @@ -426,6 +429,7 @@ sub restoreConfigs($) sub checkRunningClient() { + print $dbgf ": checkRunningClient, vzsnap=$vzsnap\n"; mydie "A backup or restore operation are already in progress" if (Proc::PID::File->running({ dir => '/tmp', verify => 1 })); @@ -463,6 +467,7 @@ sub runPing() my $host = shift(@ARGV); my $cmd = join(' ', @ARGV); + print $dbgf ": runPing host=$host, cmd=$cmd\n"; # Find $host in the list of VEs loadVeList(); my $hostname = gethostbyaddr(gethostbyname($host), AF_INET); @@ -482,6 +487,7 @@ sub runClient($) { my ($restore) = @_; + print $dbgf ": runClient restore=$restore\n"; checkRunningClient(); my $veid = shift(@ARGV); @@ -517,6 +523,8 @@ sub runClient($) # Remove snapshot, we're done delSnapshot($ve); + print $dbgf ": runClient complete\n"; + # Pass the return code back #exit $ret; FIXME: currently, cmdSystemOrEval doesn't return a retcode. exit 0; @@ -534,8 +542,9 @@ sub runClient($) sub runServer($) { my ($restore) = @_; - my $host = shift(@ARGV); + + print $dbgf ": runServer restore=$restore, host=$host\n"; mydie "Hostname argument required" if (!defined($host)); mydie "No command to execute after hostname" if ($#ARGV < 0);