fix backup

This commit is contained in:
zadam
2020-06-03 12:16:16 +02:00
parent 9de7d3fc53
commit c1fd9825aa
2 changed files with 9 additions and 10 deletions

View File

@@ -63,13 +63,13 @@ async function backupNow(name) {
return await syncMutexService.doExclusively(async () => {
const backupFile = `${dataDir.BACKUP_DIR}/backup-${name}.db`;
const success = await copyFile(backupFile, sql);
const success = await copyFile(backupFile);
if (success) {
log.error(`Creating backup ${backupFile} failed`);
log.info("Created backup at " + backupFile);
}
else {
log.info("Created backup at " + backupFile);
log.error(`Creating backup ${backupFile} failed`);
}
return backupFile;