Skip to content

Commit

Permalink
feat(backups): store if disks of incremental backups are differencing…
Browse files Browse the repository at this point in the history
… in metadata
  • Loading branch information
fbeauchamp authored and julien-f committed Dec 19, 2023
1 parent 141c141 commit e13d55b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion @xen-orchestra/backups/_cleanVm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,14 @@ export async function cleanVm(
// @todo : after 2024-04-01 remove the fixmetadata options since the size computation is fixed
if (mergedSize || (fixMetadata && fileSystemSize !== size)) {
metadata.size = mergedSize ?? fileSystemSize ?? size


if (mergedSize) {
// all disks are now key disk
metadata.isVhdDifferencing = {}
for (const id of Object.values(metadata.vdis)) {
metadata.isVhdDifferencing[`${id}.vhd`] = false
}
}
mustRegenerateCache = true
try {
await handler.writeFile(metadataPath, JSON.stringify(metadata), { flags: 'w' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class IncrementalRemoteWriter extends MixinRemoteWriter(AbstractIncrement
)

metadataContent = {
differentialVhds,
isVhdDifferencing,
jobId,
mode: job.mode,
scheduleId,
Expand Down

0 comments on commit e13d55b

Please sign in to comment.