vzdump hook script to mount USB drive?

tin

Renowned Member
Aug 14, 2010
108
2
83
Northwest NSW, Australia
I know I can do this myself, but why reinvent the wheel?
Does anyone already have a basic hook script that simply mounts a device at "job-start" and unmounts it at "job-end"?

Also, while I'm asking, is there a why to abort a backup from the hook scripts is errors are detected (such as the USB disk not mounting)?
 
Locate the script on the usb drive so it doesn't run if it's not mounted?
 
It's all good - I created a script over the last hour or so, and it seems to work OK. I'll post it here after I finish testing and cleaning it up in case anyone else wants to do this.

Edit: And to answer my own question in the first post - vzdump aborts the backup if it gets a non-zero exit from the hook script, so I just had it exit with 1 if the mount fails.
 

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!