mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
config value to disable backups, closes #1533
This commit is contained in:
parent
fe3bb2c5f6
commit
e06c5703ee
@ -5,6 +5,9 @@ instanceName=
|
|||||||
# set to true to allow using Trilium without authentication (makes sense for server build only, desktop build doesn't need password)
|
# set to true to allow using Trilium without authentication (makes sense for server build only, desktop build doesn't need password)
|
||||||
noAuthentication=false
|
noAuthentication=false
|
||||||
|
|
||||||
|
# set to true to disable backups (e.g. because of limited space on server)
|
||||||
|
noBackup=false
|
||||||
|
|
||||||
# Disable automatically generating desktop icon
|
# Disable automatically generating desktop icon
|
||||||
# noDesktopIcon=true
|
# noDesktopIcon=true
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ const Option = require('../entities/option');
|
|||||||
const TaskContext = require('./task_context.js');
|
const TaskContext = require('./task_context.js');
|
||||||
const migrationService = require('./migration');
|
const migrationService = require('./migration');
|
||||||
const cls = require('./cls');
|
const cls = require('./cls');
|
||||||
|
const config = require('./config');
|
||||||
|
|
||||||
const dbReady = utils.deferred();
|
const dbReady = utils.deferred();
|
||||||
|
|
||||||
@ -131,6 +132,12 @@ function setDbAsInitialized() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dbReady.then(() => {
|
dbReady.then(() => {
|
||||||
|
if (config.General && config.General.noBackup === true) {
|
||||||
|
log.info("Disabling scheduled backups.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setInterval(() => require('./backup').regularBackup(), 4 * 60 * 60 * 1000);
|
setInterval(() => require('./backup').regularBackup(), 4 * 60 * 60 * 1000);
|
||||||
|
|
||||||
// kickoff first backup soon after start up
|
// kickoff first backup soon after start up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user