pre-job-start phase on vzdump hook script ?

vcp_ai

Renowned Member
Jul 28, 2010
177
5
83
Valencia -Spain-
HI, I´m trying to do following:
I have a backup server that I only use one a week to hold weekly (security) backups.
I want to reduce cost, so I have it suspended all the time.
Actually I have a script that sends wol packet to resume the server, but I have to start it before the vzdump job (manual adding cron job).

It seems that one of the first vzdump tasks is to check for the avaailabity of the storage, and if not there, fails with:
' TASK ERROR: could not get storage information for 'xxxxxx': storage 'xxxxxx' is not online'

It woul be usefull to have a 'pre-job-start' phase in hook script that allows sending commands before initial checkings...
I.E. send wol packet and wait for the time to resume from suspend.

Regards
 
  • Like
Reactions: lord
HI, I´m trying to do following:
I have a backup server that I only use one a week to hold weekly (security) backups.
I want to reduce cost, so I have it suspended all the time.
Actually I have a script that sends wol packet to resume the server, but I have to start it before the vzdump job (manual adding cron job).

It seems that one of the first vzdump tasks is to check for the avaailabity of the storage, and if not there, fails with:
' TASK ERROR: could not get storage information for 'xxxxxx': storage 'xxxxxx' is not online'

It woul be usefull to have a 'pre-job-start' phase in hook script that allows sending commands before initial checkings...
I.E. send wol packet and wait for the time to resume from suspend.

Regards

AFAIU you have your own cron job which starts the backup process. IMHO it's easy to combine in with the wol commands as well as verifying whether the backup server is already up (e.g. by simply pinging it).
 
Hi Richard, you are rigth.
Problem is that whenever I change backups , I have to manually modify cron to send wol.
And if I have to do a manual Backup, I have to send wol manually.
'pre-job-sart' phase will help in both situations ...
Regards
 
Agreed, Yes, would be nice to have a "pre-job-start" option for the hook scripts. Or make the current "job-start" option run prior to checking for storage.
 
  • Like
Reactions: lord
Agreed too!
I just wrote my wakeonlan hook script and now I get the same error: TASK ERROR: could not get storage information for 'xyz': storage 'xyz' is not online, tried all suitable phases, but still getting this error.
Would be very helpful, if we could get a kind of really-pre-start phase, so we can do stuff like wol BEFORE the vzdump starts its own checks.
 
Agreed too!
I just wrote my wakeonlan hook script and now I get the same error: TASK ERROR: could not get storage information for 'xyz': storage 'xyz' is not online, tried all suitable phases, but still getting this error.
Would be very helpful, if we could get a kind of really-pre-start phase, so we can do stuff like wol BEFORE the vzdump starts its own checks.
I ended up just using the command line string from my proxmox backup job(you can get it from job status output iirc) and creating my own script that does everything(waking up PC's, other tasks, shutting them down when finished etc.) I used systemctl to create a timer for it to be run nightly. Been working great so far.
 
+1
I just stumbled upon this thread for just about the same reasons.
Until this is implemented I will proceed with manually managing vzdump jobs, as user ouldsmobile suggested.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!