feat(backups): add settings to force snapshotting during VM backup (#6221)

Fixes zammad#6735
This commit is contained in:
Florent BEAUCHAMP 2022-05-17 10:54:28 +02:00 committed by GitHub
parent 8bf3a747f0
commit 5db4083414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 1 deletions

View File

@ -173,7 +173,10 @@ class VmBackup {
const settings = this._settings
const doSnapshot =
this._isDelta || (!settings.offlineBackup && vm.power_state === 'Running') || settings.snapshotRetention !== 0
settings.unconditionalSnapshot ||
this._isDelta ||
(!settings.offlineBackup && vm.power_state === 'Running') ||
settings.snapshotRetention !== 0
if (doSnapshot) {
await Task.run({ name: 'snapshot' }, async () => {
if (!settings.bypassVdiChainsCheck) {

View File

@ -42,6 +42,7 @@ offlineSnapshot = false
snapshotRetention = 0
timeout = 0
vmTimeout = 0
unconditionalSnapshot = false
# This is a work-around.
#

View File

@ -9,6 +9,7 @@
- [Backup] Merge multiple VHDs at once which will speed up the merging ĥase after reducing the retention of a backup job(PR [#6184](https://github.com/vatesfr/xen-orchestra/pull/6184))
- [Backup] Implement file cache for listing the backups of a VM (PR [#6220](https://github.com/vatesfr/xen-orchestra/pull/6220))
- [Backup] Add setting `backups.metadata.defaultSettings.unconditionalSnapshot` in `xo-server`'s configuration file to force a snapshot even when not required by the backup, this is useful to avoid locking the VM halted during the backup (PR [#6221](https://github.com/vatesfr/xen-orchestra/pull/6221))
### Bug fixes

View File

@ -109,6 +109,7 @@ offlineSnapshot = false
snapshotRetention = 0
timeout = 0
vmTimeout = 0
unconditionalSnapshot = false
# This is a work-around.
#