From fe3bb2c5f6a2748fb09ba84360c0984e6ea72128 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 11 Jan 2021 22:47:11 +0100 Subject: [PATCH 1/2] release 0.45.8 --- src/services/build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/build.js b/src/services/build.js index 37e1951e4..fda1abf8a 100644 --- a/src/services/build.js +++ b/src/services/build.js @@ -1 +1 @@ -module.exports = { buildDate:"2021-01-11T22:29:31+01:00", buildRevision: "369274ead75947a68bf7bbb5ab1e784e81521030" }; +module.exports = { buildDate:"2021-01-11T22:47:11+01:00", buildRevision: "6afc299efb616d47c72b5f58ab2827c0e3e121c2" }; From e06c5703ee750d9818d36e2b1de8517519589a5e Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 12 Jan 2021 21:50:05 +0100 Subject: [PATCH 2/2] config value to disable backups, closes #1533 --- config-sample.ini | 3 +++ src/services/sql_init.js | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/config-sample.ini b/config-sample.ini index 7829089b1..393a124f3 100644 --- a/config-sample.ini +++ b/config-sample.ini @@ -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) noAuthentication=false +# set to true to disable backups (e.g. because of limited space on server) +noBackup=false + # Disable automatically generating desktop icon # noDesktopIcon=true diff --git a/src/services/sql_init.js b/src/services/sql_init.js index c655fcee8..af3736a07 100644 --- a/src/services/sql_init.js +++ b/src/services/sql_init.js @@ -9,6 +9,7 @@ const Option = require('../entities/option'); const TaskContext = require('./task_context.js'); const migrationService = require('./migration'); const cls = require('./cls'); +const config = require('./config'); const dbReady = utils.deferred(); @@ -131,6 +132,12 @@ function setDbAsInitialized() { } dbReady.then(() => { + if (config.General && config.General.noBackup === true) { + log.info("Disabling scheduled backups."); + + return; + } + setInterval(() => require('./backup').regularBackup(), 4 * 60 * 60 * 1000); // kickoff first backup soon after start up