my $phase = shift;
-if ($phase eq 'job-start' ||
+if ($phase eq 'job-init' ||
+ $phase eq 'job-start' ||
$phase eq 'job-end' ||
$phase eq 'job-abort') {
# undef for Proxmox Backup Server storages
+ # undef in phase 'job-init' except when --dumpdir is used directly
my $dumpdir = $ENV{DUMPDIR};
# undef when --dumpdir is used directly
print "storeid=$storeid;" if defined($storeid);
print "\n";
+ # example: wake up remote storage node and enable storage
+ if ($phase eq 'job-init') {
+ #system("wakeonlan AA:BB:CC:DD:EE:FF");
+ #sleep(30);
+ #system ("/sbin/pvesm set $storeid --disable 0") == 0 ||
+ # die "enabling storage $storeid failed";
+ }
+
# do what you want
} elsif ($phase eq 'backup-start' ||