From 686623ab687cfd4aaa5b4c156faf65ee75ad4000 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 2 Apr 2017 23:58:04 +0200 Subject: Make sqlite cache size configurable Signed-off-by: Florian Pritz --- lib/App/BorgRestore/Settings.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/App/BorgRestore/Settings.pm') diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index 564d0f8..eba5e9c 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -61,6 +61,14 @@ same string. The first regex that matches for a given file is used. This setting only affects lookups, it does not affect the creation of the database with --update-database. +=item C<$sqlite_cache_size> + +Default: 102400 + +The size of the in-memory cache of sqlite in kibibytes. This should be large +enough to fit the database so that adding new backup data does not need to use +the disk too much. + =back =head2 Example Configuration @@ -73,6 +81,7 @@ with --update-database. {regex => "^/boot", replacement => ""}, {regex => "^/", replacement => "mnt/snapshots/root/"}, ); + $sqlite_cache_size = 2097152; =head1 LICENSE @@ -86,6 +95,7 @@ our $cache_path_base = sprintf("%s/borg-restore.pl", $ENV{XDG_CACHE_HOME} // $EN our @backup_prefixes = ( {regex => "^/", replacement => ""}, ); +our $sqlite_cache_size = 102400; my @configfiles = ( sprintf("%s/borg-restore.cfg", $ENV{XDG_CONFIG_HOME} // $ENV{HOME}."/.config"), -- cgit v1.2.3-24-g4f1b