This commit is contained in:
2026-10-20 10:06:38 -04:00
parent 55f26d3fad
commit 2dd7382004
19 changed files with 643 additions and 11 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ const source=arg('--source'),destination=arg('--destination');
if(!source||source.startsWith('--'))throw new Error('Explicit --source required');
if(action!=='verify'&&(!args.includes('--consent')||!destination||destination.startsWith('--')))throw new Error('Explicit --consent and new --destination required; stop the node first');
const result=action==='create'?await createBackup(source,destination!):action==='restore'?await restoreBackup(source,destination!):await verifyBackup(source);
console.log(JSON.stringify(result,null,2));
console.log(JSON.stringify(result,null,2));
+1 -1
View File
@@ -8,4 +8,4 @@ try{for(;;){const part=await reader.read();if(part.done)break;bytes+=part.value.
finally{await reader.cancel();reader.releaseLock();}
const joined=new Uint8Array(bytes);let offset=0;for(const chunk of chunks){joined.set(chunk,offset);offset+=chunk.length;}
const report=checkOperations(JSON.parse(new TextDecoder('utf-8',{fatal:true}).decode(joined)));
console.log(JSON.stringify(report,null,2));if(!report.healthy)process.exitCode=1;
console.log(JSON.stringify(report,null,2));if(!report.healthy)process.exitCode=1;