backups: Clean cache if anything other than limits changes

This commit is contained in:
Girish Ramakrishnan
2023-07-13 12:46:42 +05:30
parent 68e56f903d
commit a28ca8fed2

View File

@@ -472,7 +472,7 @@ async function setBackupConfig(backupConfig) {
}
// if any of these changes, we have to clear the cache
if ([ 'format', 'provider', 'prefix', 'bucket', 'region', 'endpoint', 'backupFolder', 'mountPoint', 'encryption', 'encryptedFilenames' ].some(p => backupConfig[p] !== oldConfig[p])) {
if (!_.isEqual(_.omit(backupConfig, 'limits'), _.omit(oldConfig, 'limits'))) {
debug('setBackupConfig: clearing backup cache');
backups.cleanupCacheFilesSync();
}