[SOLVED] Create backup jobs using a shell command?

Jul 26, 2021
59
14
13
55
sorry - wrong forum. please delete.


Hi there,

we are using scripts for the initial setup of our PVE systems. Is it possible to setup backup jobs by shell command? The only way I'm currently found is to modify /etc/pve/vzdump.cron and add the jobs. I'm not sure if this is a valid way to do that because there is a note that this file should not be edited manually.

Thanks & Best Regards
Martin
 
Last edited:
i moved the thread to the correct subforum, no need to delete it ;)

currently the only way is via api or with 'pvesh' (which can call arbitrary api calls)

e.g. with

Code:
pvesh get /cluster/backup --output-format json-pretty

you get the current jobs

or with
Code:
pvesh usage /cluster/backup --verbose
you get the api endpoint description

also note that using 'vzdump.cron' is deprecated, we now use /etc/pve/jobs.cfg for vzdump jobs. (and different ones in the future)
 
Hi Dominik,

many thanks for your suggestions and sorry for confusion. I just opened another thread in this forum, maybe you can delete that one. Next time I know how deal with it.
 

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!