mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix backup
This commit is contained in:
parent
9de7d3fc53
commit
c1fd9825aa
@ -17,19 +17,18 @@ const TPL = `
|
|||||||
|
|
||||||
<button id="find-and-fix-consistency-issues-button" class="btn">Find and fix consistency issues</button><br/><br/>
|
<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/>
|
<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>
|
<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/>
|
<button id="backup-database-button" class="btn">Backup database now</button><br/><br/>
|
||||||
<br/>
|
|
||||||
|
|
||||||
<h4>Vacuum database</h4>
|
<h4>Vacuum database</h4>
|
||||||
|
|
||||||
|
@ -63,13 +63,13 @@ async function backupNow(name) {
|
|||||||
return await syncMutexService.doExclusively(async () => {
|
return await syncMutexService.doExclusively(async () => {
|
||||||
const backupFile = `${dataDir.BACKUP_DIR}/backup-${name}.db`;
|
const backupFile = `${dataDir.BACKUP_DIR}/backup-${name}.db`;
|
||||||
|
|
||||||
const success = await copyFile(backupFile, sql);
|
const success = await copyFile(backupFile);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
log.error(`Creating backup ${backupFile} failed`);
|
log.info("Created backup at " + backupFile);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log.info("Created backup at " + backupFile);
|
log.error(`Creating backup ${backupFile} failed`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return backupFile;
|
return backupFile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user