UBERF-8619: Rework backup %hash% usage (#7273)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-12-06 16:30:33 +07:00
committed by GitHub
parent 2b969c74e8
commit f9e3aed4fe
30 changed files with 401 additions and 429 deletions
+9 -4
View File
@@ -639,6 +639,7 @@ export function devTool (
},
cmd.region,
true,
true,
5000, // 5 gigabytes per blob
async (storage, workspaceStorage) => {
if (cmd.remove) {
@@ -710,7 +711,8 @@ export function devTool (
})
},
cmd.region,
true,
false,
false,
100
)
) {
@@ -930,7 +932,8 @@ export function devTool (
)
.option('-bl, --blobLimit <blobLimit>', 'A blob size limit in megabytes (default 15mb)', '15')
.option('-f, --force', 'Force backup', false)
.option('-c, --recheck', 'Force hash recheck on server', false)
.option('-f, --fresh', 'Force fresh backup', false)
.option('-c, --clean', 'Force clean of old backup files, only with fresh backup option', false)
.option('-t, --timeout <timeout>', 'Connect timeout in seconds', '30')
.action(
async (
@@ -939,7 +942,8 @@ export function devTool (
cmd: {
skip: string
force: boolean
recheck: boolean
fresh: boolean
clean: boolean
timeout: string
include: string
blobLimit: string
@@ -951,7 +955,8 @@ export function devTool (
const endpoint = await getTransactorEndpoint(generateToken(systemAccountEmail, wsid), 'external')
await backup(toolCtx, endpoint, wsid, storage, {
force: cmd.force,
recheck: cmd.recheck,
freshBackup: cmd.fresh,
clean: cmd.clean,
include: cmd.include === '*' ? undefined : new Set(cmd.include.split(';').map((it) => it.trim())),
skipDomains: (cmd.skip ?? '').split(';').map((it) => it.trim()),
timeout: 0,