backups (tgz): work with a layout
this will allow us to place the localstorage directory in an arbitrary location
This commit is contained in:
@@ -21,11 +21,11 @@ function initialize(callback) {
|
||||
}
|
||||
|
||||
// Main process starts here
|
||||
var backupId = process.argv[2];
|
||||
var format = process.argv[3];
|
||||
var dataDir = process.argv[4];
|
||||
const backupId = process.argv[2];
|
||||
const format = process.argv[3];
|
||||
const dataLayout = JSON.parse(process.argv[4]);
|
||||
|
||||
debug(`Backing up ${dataDir} to ${backupId}`);
|
||||
debug(`Backing up ${JSON.stringify(dataLayout)} to ${backupId}`);
|
||||
|
||||
process.on('SIGTERM', function () {
|
||||
process.exit(0);
|
||||
@@ -40,7 +40,7 @@ process.on('disconnect', function () {
|
||||
initialize(function (error) {
|
||||
if (error) throw error;
|
||||
|
||||
backups.upload(backupId, format, dataDir, (progress) => process.send(progress), function resultHandler(error) {
|
||||
backups.upload(backupId, format, dataLayout, (progress) => process.send(progress), function resultHandler(error) {
|
||||
if (error) debug('upload completed with error', error);
|
||||
|
||||
debug('upload completed');
|
||||
|
||||
Reference in New Issue
Block a user