@xen-orchestra/backups 0.57.0 → 0.58.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/README.md CHANGED
@@ -12,6 +12,19 @@ Installation of the [npm package](https://npmjs.org/package/@xen-orchestra/backu
12
12
  npm install --save @xen-orchestra/backups
13
13
  ```
14
14
 
15
+ ## Usage
16
+
17
+ ## Changing the default backup configuration
18
+
19
+ This library receives a backup configuration from `xo-server` or `xo-proxy`. This configuration is split between multiple properties:
20
+
21
+ - `config` contains values related to the general backup configuration
22
+ - `config.defaultSettings`, `config.vm.defaultSettings` and `config.metadata.defaultSettings` contain values related to backup jobs default settings:
23
+ - `config.vm.defaultSettings` is related to VM backup jobs (see [DEFAULT_XAPI_VM_SETTINGS](https://github.com/vatesfr/xen-orchestra/blob/568e14f7eec7c3ddf685d324ad4733a3ef577995/%40xen-orchestra/backups/_runners/VmsRemote.mjs#L15))
24
+ - `config.metadata.defaultSettings` is related to metadata backup jobs (see [DEFAULT_METADATA_SETTINGS](https://github.com/vatesfr/xen-orchestra/blob/568e14f7eec7c3ddf685d324ad4733a3ef577995/%40xen-orchestra/backups/_runners/Metadata.mjs#L12))
25
+ - `config.defaultSettings` is related to all backup jobs (see [DEFAULT_SETTINGS](https://github.com/vatesfr/xen-orchestra/blob/568e14f7eec7c3ddf685d324ad4733a3ef577995/%40xen-orchestra/backups/_runners/_Abstract.mjs#L7))
26
+ - in case of duplicate value, `config.vm.defaultSettings` and `config.metadata.defaultSettings` will prevail over `config.defaultSettings`, and a defined job setting will prevail over any `defaultSettings`
27
+
15
28
  ## Contributions
16
29
 
17
30
  Contributions are _very_ welcomed, either on the documentation or on
package/RemoteAdapter.mjs CHANGED
@@ -700,7 +700,11 @@ export class RemoteAdapter {
700
700
  }
701
701
  }
702
702
 
703
- async outputStream(path, input, { checksum = true, maxStreamLength, streamLength, validator = noop } = {}) {
703
+ async outputStream(
704
+ path,
705
+ input,
706
+ { checksum = !this._handler.isEncrypted, maxStreamLength, streamLength, validator = noop } = {}
707
+ ) {
704
708
  const container = watchStreamSize(input)
705
709
  await this._handler.outputStream(path, input, {
706
710
  checksum,
package/_cleanVm.mjs CHANGED
@@ -575,7 +575,7 @@ export async function cleanVm(
575
575
  if (mergedSize) {
576
576
  // all disks are now key disk
577
577
  metadata.isVhdDifferencing = {}
578
- for (const id of Object.values(metadata.vdis ?? {})) {
578
+ for (const id of Object.keys(metadata.vdis ?? {})) {
579
579
  metadata.isVhdDifferencing[`${id}.vhd`] = false
580
580
  }
581
581
  }
@@ -27,7 +27,7 @@ const LTR_DEFINITIONS = {
27
27
  copy.date(date.date() - firstDayOfWeek)
28
28
  // warning, the year in term of week may different from YYYY
29
29
  // since the computation of the first week of a year is timezone dependant
30
- return copy.format('gggg-WW')
30
+ return copy.format('gggg-ww')
31
31
  }
32
32
  },
33
33
  ancestor: 'daily',
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.57.0",
11
+ "version": "0.58.0",
12
12
  "engines": {
13
13
  "node": ">=14.18"
14
14
  },
@@ -28,7 +28,7 @@
28
28
  "@vates/nbd-client": "^3.1.2",
29
29
  "@vates/parse-duration": "^0.1.1",
30
30
  "@xen-orchestra/async-map": "^0.1.2",
31
- "@xen-orchestra/fs": "^4.3.0",
31
+ "@xen-orchestra/fs": "^4.4.0",
32
32
  "@xen-orchestra/log": "^0.7.1",
33
33
  "@xen-orchestra/template": "^0.1.0",
34
34
  "app-conf": "^3.0.0",
@@ -59,7 +59,7 @@
59
59
  "tmp": "^0.2.1"
60
60
  },
61
61
  "peerDependencies": {
62
- "@xen-orchestra/xapi": "^7.9.0"
62
+ "@xen-orchestra/xapi": "^7.11.0"
63
63
  },
64
64
  "license": "AGPL-3.0-or-later",
65
65
  "author": {