Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix backup
zadamc1fd9825aa60
diff --git a/src/public/app/dialogs/options/advanced.js b/src/public/app/dialogs/options/advanced.jsindex 1ea1fabca1..b12f67268b 100644--- a/src/public/app/dialogs/options/advanced.js+++ b/src/public/app/dialogs/options/advanced.js@@ -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>-<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)+<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/>+<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>diff --git a/src/services/backup.js b/src/services/backup.jsindex a9346b1591..15f24e6487 100644--- a/src/services/backup.js+++ b/src/services/backup.js@@ -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;