diff --git a/CHANGELOG.md b/CHANGELOG.md index 50039acca..7e0a17eda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [Backup NG form] improve schedule's form [#3138](https://github.com/vatesfr/xen-orchestra/issues/3138) (PR [#3359](https://github.com/vatesfr/xen-orchestra/pull/3359)) - [Backup NG Overview] Display transferred and merged data size for backup jobs [#3340](https://github.com/vatesfr/xen-orchestra/issues/3340) (PR [#3408](https://github.com/vatesfr/xen-orchestra/pull/3408)) - [VM] Display the PVHVM status [#3014](https://github.com/vatesfr/xen-orchestra/issues/3014) (PR [#3418](https://github.com/vatesfr/xen-orchestra/pull/3418)) +- [Backup reports] Ability to test the plugin (PR [#3421](https://github.com/vatesfr/xen-orchestra/pull/3421)) ### Bug fixes @@ -20,6 +21,7 @@ ### Released packages +- xo-server-backup-reports v0.14.0 - @xen-orchestra/async-map v0.0.0 - @xen-orchestra/mixin v0.0.0 - @xen-orchestra/emit-async v0.0.0 diff --git a/docs/assets/log-runId.png b/docs/assets/log-runId.png new file mode 100644 index 000000000..d2a641d59 Binary files /dev/null and b/docs/assets/log-runId.png differ diff --git a/docs/backups.md b/docs/backups.md index 00459da40..e252e3135 100644 --- a/docs/backups.md +++ b/docs/backups.md @@ -29,6 +29,12 @@ You also have a filter to search anything related to these logs. > Logs are not "live" tasks. If you restart XOA during a backup, the log associated with the job will stay in orange (in progress), because it wasn't finished. It will stay forever unfinished because the job was cut in the middle. +## Backups execution + +Each backups' job execution is identified by a `runId`. You can find this `runId` in its detailed log. + +![](./assets/log-runId.png) + ## Consistent backup (with quiesce snapshots) All backup types rely on snapshots. But what about data consistency? By default, Xen Orchestra will try to take a **quiesced snapshot** every time a snapshot is done (and fall back to normal snapshots if it's not possible). diff --git a/packages/xo-server-backup-reports/src/index.js b/packages/xo-server-backup-reports/src/index.js index 1f10f939a..f968edfe8 100644 --- a/packages/xo-server-backup-reports/src/index.js +++ b/packages/xo-server-backup-reports/src/index.js @@ -30,6 +30,20 @@ export const configurationSchema = { }, } +export const testSchema = { + type: 'object', + + properties: { + runId: { + type: 'string', + description: `job's runId`, + }, + }, + + additionalProperties: false, + required: ['runId'], +} + // =================================================================== const ICON_FAILURE = '🚨' @@ -118,6 +132,10 @@ class BackupReportsXoPlugin { this._xo.on('job:terminated', this._report) } + test ({ runId }) { + return this._backupNgListener(undefined, undefined, undefined, runId) + } + unload () { this._xo.removeListener('job:terminated', this._report) }