diff --git a/gramps/gen/config.py b/gramps/gen/config.py index 074cef3ac..6e5e63672 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -159,6 +159,7 @@ register('behavior.addons-url', "https://raw.githubusercontent.com/gramps-projec register('database.backend', 'bsddb') register('database.compress-backup', True) +register('database.autobackup', True) ## make backup when exiting, if there are changes register('database.path', os.path.join(HOME_DIR, 'grampsdb')) register('export.proxy-order', diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index d53c890d6..790dc715b 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -1795,7 +1795,8 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): """ if self._directory: if update: - self.autobackup(user) + if config.get('database.autobackup'): + self.autobackup(user) # This is just a dummy file to indicate last modified time of the # database for gramps.cli.clidbman: filename = os.path.join(self._directory, "meta_data.db")