Skip to content

Commit

Permalink
feat(backups): add config file settings to force snapshot of offline …
Browse files Browse the repository at this point in the history
…WM wen using snapshot mode
  • Loading branch information
fbeauchamp committed May 6, 2022
1 parent df07d4a commit 9461cf3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion @xen-orchestra/backups/_VmBackup.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ class VmBackup {
const settings = this._settings

const doSnapshot =
this._isDelta || (!settings.offlineBackup && vm.power_state === 'Running') || settings.snapshotRetention !== 0
this._isDelta ||
(!settings.offlineBackup && vm.power_state === 'Running') ||
settings.snapshotRetention !== 0 ||
// https://help.vates.fr/#ticket/zoom/6735
(settings.offlineSnapshot && settings.snapshotHaltedVmWhenUsingOfflineSnapshot)
if (doSnapshot) {
await Task.run({ name: 'snapshot' }, async () => {
if (!settings.bypassVdiChainsCheck) {
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [Disaster Recovery] add a setting `snapshotHaltedVmWhenUsingOfflineSnapshot` to force a snapshot even when the WM is halted and using `offline snapshot` mode (PR [#6221](https://github.com/vatesfr/xen-orchestra/pull/6221))

### Bug fixes

> Users must be able to say: “I had this issue, happy to know it's fixed”
Expand All @@ -33,5 +35,4 @@
<!--packages-start-->


<!--packages-end-->
1 change: 1 addition & 0 deletions packages/xo-server/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ offlineSnapshot = false
snapshotRetention = 0
timeout = 0
vmTimeout = 0
snapshotHaltedVmWhenUsingOfflineSnapshot = true

# This is a work-around.
#
Expand Down

0 comments on commit 9461cf3

Please sign in to comment.