backups (tgz): save integrity information
we generate a signing key pair for each target. Initially, I had this as global. We needed a route to return the public key and putting it under backup target seemed natural. Since we delete the backups when we delete a target, we lose all the signing hashes. So, it's fine to lose the key pair on target delete.
This commit is contained in:
@@ -44,12 +44,10 @@ function throttledProgressCallback(msecs) {
|
||||
(async function main() {
|
||||
await database.initialize();
|
||||
|
||||
const [uploadError] = await safe(backuptask.upload(remotePath, format, dataLayoutString, throttledProgressCallback(5000)));
|
||||
const [uploadError, result] = await safe(backuptask.upload(remotePath, format, dataLayoutString, throttledProgressCallback(5000)));
|
||||
debug('upload completed. error: %o', uploadError);
|
||||
|
||||
process.send({ result: uploadError ? uploadError.message : '' });
|
||||
process.send({ result, errorMessage: uploadError?.message });
|
||||
|
||||
// https://nodejs.org/api/process.html are exit codes used by node. apps.js uses the value below
|
||||
// to check apptask crashes
|
||||
process.exit(uploadError ? 50 : 0);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user