backups: add per site enabledForUpdates flag

previously, we had a singleton 'main' flag to indicate a site can
be used for updates. with this new approach, we can get rid of the
'primary' concept. each site can be used for updates or not.
This commit is contained in:
Girish Ramakrishnan
2025-09-22 17:59:26 +02:00
parent 69d92ba0a8
commit 5157789774
11 changed files with 88 additions and 88 deletions
+1 -10
View File
@@ -222,16 +222,7 @@ async function databaseSetup() {
await dashboard._setLocation(constants.DASHBOARD_SUBDOMAIN, exports.dashboardDomain);
// duplicated here since we clear the database
const id = await backupSites.add({
provider: 'filesystem',
name: 'Default',
config: { backupDir: '/tmp/boxtest' },
format: 'tgz',
retention: { keepWithinSecs: 2 * 24 * 60 * 60 },
schedule: '00 00 23 * * *',
contents: null
}, auditSource);
await backupSites.setPrimary({ id }, auditSource);
await backupSites.addDefault(auditSource);
}
async function domainSetup() {