feat(@xen-orchestra/backups): refactor backup merge code (#9300)

this merge code leverage the new classes introduced to handle qcow2, improving our flexibility, and future uses.

this also improve the performance on "block mode" backups (s3/ azure and other storage with the option), since it reliably updates the block allocation table only at the end of the merge instead of each time a new block is detected
This commit is contained in:
spacotte-vates
2026-02-16 18:04:12 +01:00
committed by GitHub
parent c497ae3d38
commit 4e50858526
14 changed files with 2185 additions and 193 deletions

View File

@@ -18,9 +18,12 @@ export interface FileAccessor {
buffer: Buffer | DataView,
position: number
): Promise<{ bytesRead: number; buffer: Buffer | DataView }>
readFile(path: string): Promise<string>
writeFile(path: string, content: string, opts?: unknown): Promise<void>
getSize(path: string): Promise<number>
mktree(path: string): Promise<void>
rmtree(path: string): Promise<void>
unlink(path: string): Promise<void>
outputStream(stream: Readable): Promise<void>
rename(path: string, newPath: string): Promise<void>
}