]> git.proxmox.com Git - pve-manager.git/commit - PVE/API2/Backup.pm
api/backup: handle new vzdump jobs
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 8 Nov 2021 13:07:57 +0000 (14:07 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Nov 2021 15:11:00 +0000 (16:11 +0100)
commit305921b1abfcd2463b590ccbee408ea5d8ac90eb
treeecb8de00bee28643b8205cc3123774cde9575f50
parent85b9ba88f18c824fba3f96cbcee3060401e56a61
api/backup: handle new vzdump jobs

in addition to listing the vzdump.cron jobs, also list from the
jobs.cfg file.

updates/creations go into the new jobs.cfg only now
and on update, starttime+dow get converted to a schedule
this transformation is straight forward, since 'dow'
is already in a compatible format (e.g. 'mon,tue') and we simply
append the starttime (if any)

id on creation is optional for now (for api compat), but will
be autogenerated (uuid). on update, we simply take the id from before
(the ids of the other entries in vzdump.cron will change but they would
anyway)

as long as we have the vzdump.cron file, we must lock both
vzdump.cron and jobs.cfg, since we often update both

we also change the backupinfo api call to read the jobs.cfg too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Backup.pm
PVE/API2/Cluster/BackupInfo.pm