From d9edd65b1f66d64d28a99f8e8a060f1a552b27fd Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 13 Sep 2018 23:46:31 +0200 Subject: Change prepare_data_in_memory default to 0 to enable direct-to-db Also instantly deprecate the option since it is only a short term fix in case someone notices problems with the new code. Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Settings.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index 0d9d015..9ef03d7 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -81,15 +81,16 @@ cache. =item C<$prepare_data_in_memory> -Default: 1 +Default: 0 When new archives are added to the cache, the modification time of each parent directory for a file's path are updated. If this setting is set to 1, these updates are done in memory before data is written to the database. If it is set to 0, any changes are written directly to the database. Many values are updated multiple time, thus writing directly to the database is slower, but preparing -the data in memory may require a substaintial amount of memory. If you run into -out-of-memory problem try setting this to 0. +the data in memory may require a substaintial amount of memory. + +New in version 3.2.0. Deprecated in v3.2.0 for future removal possibly in v4.0.0. =back @@ -104,7 +105,7 @@ out-of-memory problem try setting this to 0. {regex => "^/", replacement => "mnt/snapshots/root/"}, ); $sqlite_cache_size = 2097152; - $prepare_data_in_memory = 1; + $prepare_data_in_memory = 0; 1; #ensure positive return value @@ -127,7 +128,7 @@ our @backup_prefixes = ( {regex => "^/", replacement => ""}, ); our $sqlite_cache_size = 102400; -our $prepare_data_in_memory = 1; +our $prepare_data_in_memory = 0; method new_no_defaults($class: $deps = {}) { my $self = {}; -- cgit v1.2.3-24-g4f1b