]> git.proxmox.com Git - pve-manager-legacy.git/commit
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)
commit64c5345deb20cb8cccedb1769df6486e7f576f8a
tree5026f05ec2d46a295ca5d82338750f84424d75cb
parentf8d2cf2503e3dd942713d2b4a46ec376c1b60e41
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