diff --git a/@xen-orchestra/backups/_runners/Metadata.mjs b/@xen-orchestra/backups/_runners/Metadata.mjs index 9e0a7d26276..82a9c141c3f 100644 --- a/@xen-orchestra/backups/_runners/Metadata.mjs +++ b/@xen-orchestra/backups/_runners/Metadata.mjs @@ -17,7 +17,7 @@ const DEFAULT_METADATA_SETTINGS = { export const Metadata = class MetadataBackupRunner extends Abstract { _computeBaseSettings(config, job) { const baseSettings = { ...DEFAULT_SETTINGS } - Object.assign(baseSettings, DEFAULT_METADATA_SETTINGS, config.defaultSettings, config.metadata?.defaultSettings) + Object.assign(baseSettings, DEFAULT_METADATA_SETTINGS, config) Object.assign(baseSettings, job.settings['']) return baseSettings } diff --git a/@xen-orchestra/backups/_runners/VmsRemote.mjs b/@xen-orchestra/backups/_runners/VmsRemote.mjs index 2ad14d2a024..35937efd08c 100644 --- a/@xen-orchestra/backups/_runners/VmsRemote.mjs +++ b/@xen-orchestra/backups/_runners/VmsRemote.mjs @@ -31,7 +31,7 @@ const DEFAULT_REMOTE_VM_SETTINGS = { export const VmsRemote = class RemoteVmsBackupRunner extends Abstract { _computeBaseSettings(config, job) { const baseSettings = { ...DEFAULT_SETTINGS } - Object.assign(baseSettings, DEFAULT_REMOTE_VM_SETTINGS, config.defaultSettings, config.vm?.defaultSettings) + Object.assign(baseSettings, DEFAULT_REMOTE_VM_SETTINGS, config) Object.assign(baseSettings, job.settings['']) return baseSettings } diff --git a/@xen-orchestra/backups/_runners/VmsXapi.mjs b/@xen-orchestra/backups/_runners/VmsXapi.mjs index 57b5cc3f8b4..042c762ed47 100644 --- a/@xen-orchestra/backups/_runners/VmsXapi.mjs +++ b/@xen-orchestra/backups/_runners/VmsXapi.mjs @@ -42,7 +42,7 @@ const DEFAULT_XAPI_VM_SETTINGS = { export const VmsXapi = class VmsXapiBackupRunner extends Abstract { _computeBaseSettings(config, job) { const baseSettings = { ...DEFAULT_SETTINGS } - Object.assign(baseSettings, DEFAULT_XAPI_VM_SETTINGS, config.defaultSettings, config.vm?.defaultSettings) + Object.assign(baseSettings, DEFAULT_XAPI_VM_SETTINGS, config) Object.assign(baseSettings, job.settings['']) return baseSettings } diff --git a/packages/xo-server/src/xo-mixins/backups-ng/index.mjs b/packages/xo-server/src/xo-mixins/backups-ng/index.mjs index 0852e11252c..464b45ae2f3 100644 --- a/packages/xo-server/src/xo-mixins/backups-ng/index.mjs +++ b/packages/xo-server/src/xo-mixins/backups-ng/index.mjs @@ -404,8 +404,7 @@ export default class BackupNg { // FIXME: does not take into account default values defined in @xen-orchestra/backups/Backup const jobSettings = { - ...config.defaultSettings, - ...config.vm?.defaultSettings, + ...config, ...job.settings[''], ...job.settings[schedule.id], }