Skip to content

Commit d3ffb3c

Browse files
authored
Fix backup-all script (#8255)
Signed-off-by: Andrey Sobolev <[email protected]>
1 parent 2ff661d commit d3ffb3c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

dev/tool/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,9 @@ export function devTool (
10101010

10111011
const skipWorkspaces = new Set(cmd.skip.split(',').map((it) => it.trim()))
10121012

1013-
const token = generateToken(systemAccountUuid, '' as WorkspaceUuid)
1013+
const token = generateToken(systemAccountUuid, '' as WorkspaceUuid, {
1014+
service: 'tool'
1015+
})
10141016
const workspaces = (await getAccountClient(token).listWorkspaces(cmd.region))
10151017
.sort((a, b) => {
10161018
const bsize = b.backupInfo?.backupSize ?? 0

server/backup/src/backup.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,6 +2810,13 @@ export async function checkBackupIntegrity (ctx: MeasureContext, storage: Backup
28102810
modified = true
28112811
}
28122812
}
2813+
if (backupInfo.migrations == null) {
2814+
backupInfo.migrations = {}
2815+
}
2816+
if (!backupInfo.migrations.zeroCheckSize) {
2817+
backupInfo.migrations.zeroCheckSize = true
2818+
modified = true
2819+
}
28132820
if (modified) {
28142821
await storage.writeFile(infoFile, gzipSync(JSON.stringify(backupInfo, undefined, 2), { level: defaultLevel }))
28152822
}

0 commit comments

Comments
 (0)