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

@ -17,19 +17,18 @@ const TPL = `
<button id="find-and-fix-consistency-issues-button" class="btn">Find and fix consistency issues</button><br/><br/>
<h4>Debugging</h4>
<h4>Anonymize database</h4>
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and some non-sensitive metadata)
for sharing online for debugging purposes without fear of leaking your personal data.</p>
<button id="anonymize-button" class="btn">Save anonymized database</button><br/><br/>
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata)
for sharing online for debugging purposes without fear of leaking your personal data.</p>
<h4>Backup database</h4>
<button id="backup-database-button" class="btn">Backup database</button>
<p>Trilium has automatic backup (daily, weekly, monthly), but you can also trigger backup manually here.</p>
<br/>
<br/>
<button id="backup-database-button" class="btn">Backup database now</button><br/><br/>
<h4>Vacuum database</h4>

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;