move retentionSecs inside retentionPolicy

part of #441
This commit is contained in:
Girish Ramakrishnan
2020-05-14 16:19:35 -07:00
parent 573da29a4d
commit 6a9fe1128f
5 changed files with 27 additions and 7 deletions

View File

@@ -145,7 +145,7 @@ let gDefaults = (function () {
backupFolder: '/var/backups',
format: 'tgz',
encryption: null,
retentionSecs: 2 * 24 * 60 * 60, // 2 days
retentionPolicy: { keepWithin: 2 * 24 * 60 * 60 }, // 2 days
intervalSecs: 24 * 60 * 60 // ~1 day
};
result[exports.PLATFORM_CONFIG_KEY] = {};
@@ -428,7 +428,7 @@ function setBackupCredentials(credentials, callback) {
if (error) return callback(error);
// preserve these fields
const extra = _.pick(currentConfig, 'retentionSecs', 'intervalSecs', 'copyConcurrency', 'syncConcurrency');
const extra = _.pick(currentConfig, 'retentionPolicy', 'intervalSecs', 'copyConcurrency', 'syncConcurrency');
const backupConfig = _.extend({}, credentials, extra);