diff --git a/src/backups.js b/src/backups.js index 97f91098d..9dadd5b14 100644 --- a/src/backups.js +++ b/src/backups.js @@ -565,9 +565,13 @@ function restore(backupConfig, backupId, callback) { download(backupConfig, backupId, backupConfig.format, paths.BOX_DATA_DIR, function (error) { if (error) return callback(error); + debug('restore: download completed, importing database'); + database.importFromFile(`${paths.BOX_DATA_DIR}/box.mysqldump`, function (error) { if (error) return callback(new BackupsError(BackupsError.INTERNAL_ERROR, error)); + debug('restore: database imported'); + callback(); }); }); diff --git a/src/setup.js b/src/setup.js index f24062132..2dd7dd586 100644 --- a/src/setup.js +++ b/src/setup.js @@ -293,8 +293,9 @@ function restore(backupConfig, backupId, version, callback) { async.series([ backups.restore.bind(null, backupConfig, backupId), autoprovision, - // currently, our suggested restore flow is after a dnsSetup. This re-creates DKIM keys and updates the DNS - // for this reason, we have to re-setup DNS after a restore. Once we have a 100% IP based restore, we can skip this + // currently, our suggested restore flow is after a dnsSetup. The dnSetup creates DKIM keys and updates the DNS + // for this reason, we have to re-setup DNS after a restore so it has DKIm from the backup + // Once we have a 100% IP based restore, we can skip this mail.setDnsRecords.bind(null, config.adminDomain()), shell.sudo.bind(null, 'restart', [ RESTART_CMD ]) ], function (error) {