mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
feat(backup): display full path to the database
This commit is contained in:
parent
99c179e29a
commit
33ae91f49c
@ -74,7 +74,7 @@ function periodBackup(optionName: "lastDailyBackupDate" | "lastWeeklyBackupDate"
|
|||||||
async function backupNow(name: string) {
|
async function backupNow(name: string) {
|
||||||
// we don't want to back up DB in the middle of sync with potentially inconsistent DB state
|
// we don't want to back up DB in the middle of sync with potentially inconsistent DB state
|
||||||
return await syncMutexService.doExclusively(async () => {
|
return await syncMutexService.doExclusively(async () => {
|
||||||
const backupFile = `${dataDir.BACKUP_DIR}/backup-${name}.db`;
|
const backupFile = path.resolve(`${dataDir.BACKUP_DIR}/backup-${name}.db`);
|
||||||
|
|
||||||
if (!fs.existsSync(dataDir.BACKUP_DIR)) {
|
if (!fs.existsSync(dataDir.BACKUP_DIR)) {
|
||||||
fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
|
fs.mkdirSync(dataDir.BACKUP_DIR, 0o700);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user