restore: secrets must be copied over after downloading box backup

This commit is contained in:
Girish Ramakrishnan
2021-11-16 11:14:41 -08:00
parent f6356b2dff
commit 39be267805
2 changed files with 37 additions and 47 deletions

View File

@@ -62,7 +62,7 @@ async function setupTask(domain, auditSource) {
assert.strictEqual(typeof auditSource, 'object');
try {
await blobs.initSecrets();
await blobs.generateSecrets();
await cloudron.setupDnsAndCert(constants.DASHBOARD_LOCATION, domain, auditSource, (progress) => setProgress('setup', progress.message));
await cloudron.setDashboardDomain(domain, auditSource);
setProgress('setup', 'Done'),
@@ -154,6 +154,7 @@ async function restoreTask(backupConfig, backupId, sysinfoConfig, options, audit
try {
setProgress('restore', 'Downloading box backup');
await backuptask.restore(backupConfig, backupId, (progress) => setProgress('restore', progress.message));
await blobs.restoreSecrets();
setProgress('restore', 'Downloading mail backup');
const mailBackups = await backups.getByIdentifierAndStatePaged(backups.BACKUP_IDENTIFIER_MAIL, backups.BACKUP_STATE_NORMAL, 1, 1);