summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore/Settings.pm
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-09-06 18:19:07 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-09-06 18:19:07 +0200
commitb8d19a541782812a4cd02a408344760d83b7b4e0 (patch)
tree35a76837e3cbb16067438d8d94d2399ee6914224 /lib/App/BorgRestore/Settings.pm
parent892db03a49333daf7d808395a0a25e81ec2a76ab (diff)
downloadApp-BorgRestore-b8d19a541782812a4cd02a408344760d83b7b4e0.tar.gz
App-BorgRestore-b8d19a541782812a4cd02a408344760d83b7b4e0.tar.xz
Add direct-to-db adding of paths instead of memory only
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore/Settings.pm')
-rw-r--r--lib/App/BorgRestore/Settings.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm
index 7bf9664..a221502 100644
--- a/lib/App/BorgRestore/Settings.pm
+++ b/lib/App/BorgRestore/Settings.pm
@@ -79,6 +79,18 @@ The size of the in-memory cache of sqlite in kibibytes. Increasing this may
reduce disk IO and improve performance on certain systems when updating the
cache.
+=item C<$prepare_data_in_memory>
+
+Default: 1
+
+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.
+
=back
=head2 Example Configuration
@@ -92,6 +104,7 @@ cache.
{regex => "^/", replacement => "mnt/snapshots/root/"},
);
$sqlite_cache_size = 2097152;
+ $prepare_data_in_memory = 1;
1; #ensure positive return value
@@ -110,6 +123,7 @@ our @backup_prefixes = (
{regex => "^/", replacement => ""},
);
our $sqlite_cache_size = 102400;
+our $prepare_data_in_memory = 1;
my @configfiles;
if (defined $ENV{XDG_CONFIG_HOME} or defined $ENV{HOME}) {