diff --git a/@xen-orchestra/backups/_runners/_writers/IncrementalXapiWriter.mjs b/@xen-orchestra/backups/_runners/_writers/IncrementalXapiWriter.mjs index 62766f2773..15be445c39 100644 --- a/@xen-orchestra/backups/_runners/_writers/IncrementalXapiWriter.mjs +++ b/@xen-orchestra/backups/_runners/_writers/IncrementalXapiWriter.mjs @@ -263,6 +263,7 @@ export class IncrementalXapiWriter extends MixinXapiWriter(AbstractIncrementalWr vdiRef: activeVdi.$ref, baseRef: snapshot.$ref, onlyListChangedBlocks: true, + preferNbd: this._settings.preferNbd, }) await diffDisk.init() if (diffDisk.getBlockIndexes().length === 0) { diff --git a/@xen-orchestra/xapi/disks/Xapi.mjs b/@xen-orchestra/xapi/disks/Xapi.mjs index e57ab28ce2..c9261e6066 100644 --- a/@xen-orchestra/xapi/disks/Xapi.mjs +++ b/@xen-orchestra/xapi/disks/Xapi.mjs @@ -98,6 +98,7 @@ export class XapiDiskSource extends DiskPassthrough { let source let streamSource try { + // we will only use the stream for bloc list streamSource = await this.#openExportStream({ onlyListChangedBlocks: true }) if (streamSource === undefined) { throw new Error(`Can't open stream source`) @@ -111,7 +112,7 @@ export class XapiDiskSource extends DiskPassthrough { await source.init() this.#useNbd = true - return await this.#formatSourceDisk(source, 'NBT') + return await this.#formatSourceDisk(source, 'NBD') } catch (err) { // init probaby failed, so nothing to close , but better safe than sorry await source?.close().catch(warn) @@ -163,7 +164,7 @@ export class XapiDiskSource extends DiskPassthrough { * * @returns {Promise} */ - async #openExportStream({ onlyListChangedBlocks = false } = {}) { + async #openExportStream({ onlyListChangedBlocks = this.#onlyListChangedBlocks } = {}) { const xapi = this.#xapi const baseRef = this.#baseRef const vdiRef = this.#vdiRef @@ -263,7 +264,7 @@ export class XapiDiskSource extends DiskPassthrough { await source.init() this.#useNbd = true this.#useCbt = true - return await this.#formatSourceDisk(source, 'NBT+CBT') + return await this.#formatSourceDisk(source, 'NBD+CBT') } catch (error) { if (/** @type {NodeJS.ErrnoException} */ (error).code !== 'CBT_DISABLED') { info('Error in openNbdCBT', error) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 49ac13981b..cb216daddb 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -17,6 +17,8 @@ > Users must be able to say: "I had this issue, happy to know it's fixed" +- [Backups] Fix slow replication startup and fallback to full on qcow2 (PR [#10319](https://github.com/vatesfr/xen-orchestra/pull/10319)) + ### Packages to release > When modifying a package, add it here with its release type. @@ -33,4 +35,6 @@ +- @xen-orchestra/backups patch +- @xen-orchestra/xapi patch