@xen-orchestra/backups 0.61.1 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RemoteAdapter.mjs
CHANGED
package/_incrementalVm.mjs
CHANGED
|
@@ -12,6 +12,8 @@ import { BASE_DELTA_VDI, COPY_OF, VM_UUID } from './_otherConfig.mjs'
|
|
|
12
12
|
|
|
13
13
|
import { XapiDiskSource } from '@xen-orchestra/xapi'
|
|
14
14
|
import { toVhdStream } from 'vhd-lib/disk-consumer/index.mjs'
|
|
15
|
+
import { toQcow2Stream } from '@xen-orchestra/qcow2'
|
|
16
|
+
import { VHD_MAX_SIZE } from '@xen-orchestra/xapi/disks/Xapi.mjs'
|
|
15
17
|
|
|
16
18
|
const ensureArray = value => (value === undefined ? [] : Array.isArray(value) ? value : [value])
|
|
17
19
|
|
|
@@ -235,8 +237,18 @@ export const importIncrementalVm = defer(async function importIncrementalVm(
|
|
|
235
237
|
continue
|
|
236
238
|
}
|
|
237
239
|
await xapi.setField('VDI', vdi.$ref, 'name_label', `[Importing] ${vdiRecords[id].name_label}`)
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
|
|
241
|
+
let stream, format
|
|
242
|
+
if (vdi.virtual_size > VHD_MAX_SIZE) {
|
|
243
|
+
stream = await toQcow2Stream(disk)
|
|
244
|
+
format = 'qcow2'
|
|
245
|
+
} else {
|
|
246
|
+
stream = await toVhdStream(disk)
|
|
247
|
+
format = 'vhd'
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
await vdi.$importContent(stream, { cancelToken, format })
|
|
251
|
+
|
|
240
252
|
await xapi.setField('VDI', vdi.$ref, 'name_label', vdiRecords[id].name_label)
|
|
241
253
|
}
|
|
242
254
|
}),
|
|
@@ -146,9 +146,9 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
146
146
|
if (!settings.bypassVdiChainsCheck) {
|
|
147
147
|
await vm.$assertHealthyVdiChains()
|
|
148
148
|
}
|
|
149
|
-
if (settings.
|
|
149
|
+
if (settings.cbtDestroySnapshotData) {
|
|
150
150
|
try {
|
|
151
|
-
// enable CBT on all disks if
|
|
151
|
+
// enable CBT on all disks if we want to be able to purge snapshot data
|
|
152
152
|
const diskRefs = await xapi.VM_getDisks(vm.$ref)
|
|
153
153
|
await Promise.all(diskRefs.map(diskRef => xapi.callAsync('VDI.enable_cbt', diskRef)))
|
|
154
154
|
} catch (error) {
|
package/disks/RemoteVhd.mjs
CHANGED
|
@@ -94,13 +94,7 @@ export class RemoteVhd extends RandomAccessDisk {
|
|
|
94
94
|
* @returns {Promise<void>}
|
|
95
95
|
*/
|
|
96
96
|
async close() {
|
|
97
|
-
|
|
98
|
-
await this.#dispose()
|
|
99
|
-
} catch (err) {
|
|
100
|
-
if (err.code !== 'EBADF') {
|
|
101
|
-
throw err // handle double dispose
|
|
102
|
-
}
|
|
103
|
-
}
|
|
97
|
+
await this.#dispose()
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
/**
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/vatesfr/xen-orchestra.git"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.62.0",
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=14.18"
|
|
14
14
|
},
|
|
@@ -29,9 +29,10 @@
|
|
|
29
29
|
"@vates/nbd-client": "^3.1.3",
|
|
30
30
|
"@vates/parse-duration": "^0.1.1",
|
|
31
31
|
"@xen-orchestra/async-map": "^0.1.2",
|
|
32
|
-
"@xen-orchestra/disk-transform": "^1.0
|
|
33
|
-
"@xen-orchestra/fs": "^4.
|
|
32
|
+
"@xen-orchestra/disk-transform": "^1.1.0",
|
|
33
|
+
"@xen-orchestra/fs": "^4.6.0",
|
|
34
34
|
"@xen-orchestra/log": "^0.7.1",
|
|
35
|
+
"@xen-orchestra/qcow2": "^1.0.0",
|
|
35
36
|
"@xen-orchestra/template": "^0.1.0",
|
|
36
37
|
"app-conf": "^3.0.0",
|
|
37
38
|
"compare-versions": "^6.0.0",
|
|
@@ -50,8 +51,8 @@
|
|
|
50
51
|
"tar": "^6.1.15",
|
|
51
52
|
"uuid": "^9.0.0",
|
|
52
53
|
"value-matcher": "^0.2.0",
|
|
53
|
-
"vhd-lib": "^4.
|
|
54
|
-
"xen-api": "^4.7.
|
|
54
|
+
"vhd-lib": "^4.14.0",
|
|
55
|
+
"xen-api": "^4.7.2",
|
|
55
56
|
"yazl": "^2.5.1"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"tmp": "^0.2.1"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
|
-
"@xen-orchestra/xapi": "^8.
|
|
65
|
+
"@xen-orchestra/xapi": "^8.3.0"
|
|
65
66
|
},
|
|
66
67
|
"license": "AGPL-3.0-or-later",
|
|
67
68
|
"author": {
|