Rework backuptask into tar.js

This makes it easy to integrate another backup strategy
as the next step
This commit is contained in:
Girish Ramakrishnan
2017-09-17 18:50:26 -07:00
parent 6cddd61a24
commit 6525a467a2
11 changed files with 456 additions and 609 deletions

View File

@@ -41,9 +41,11 @@ function exec(tag, file, args, options, callback) {
debug(tag + ' execFile: %s', file); // do not dump args as it might have sensitive info
var cp = child_process.spawn(file, args, options);
cp.stdout.on('data', function (data) {
debug(tag + ' (stdout): %s', data.toString('utf8'));
});
if (!options.noDebugStdout) {
cp.stdout.on('data', function (data) {
debug(tag + ' (stdout): %s', data.toString('utf8'));
});
}
cp.stderr.on('data', function (data) {
debug(tag + ' (stderr): %s', data.toString('utf8'));