.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "App::BorgRestore::Settings 3pm" .TH App::BorgRestore::Settings 3pm 2023-09-03 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME App::BorgRestore::Settings \- Settings package .SH DESCRIPTION .IX Header "DESCRIPTION" App::BorgRestore::Settings searches for configuration files in the following locations in order. The first file found will be used, any later ones are ignored. If no files are found, defaults are used. .IP \(bu 4 \&\f(CW$XDG_CONFIG_HOME\fR/borg\-restore.cfg .IP \(bu 4 /etc/borg\-restore.cfg .SS "Configuration Options" .IX Subsection "Configuration Options" You can set the following options in the config file. .PP Note that the configuration file is parsed as a perl script. Thus you can also use any features available in perl itself. .PP Also note that it is important that the last statement of the file is positive because it is used to check that running the config went well. You can simply use "1;" on the last line as shown in the example config. .ie n .IP $borg_repo 4 .el .IP \f(CW$borg_repo\fR 4 .IX Item "$borg_repo" This specifies the URL to the borg repo as used in other borg commands. If you use the \f(CW$BORG_REPO\fR environment variable set this to an empty string. Default: "backup:borg\-".hostname; .ie n .IP $backup_prefix 4 .el .IP \f(CW$backup_prefix\fR 4 .IX Item "$backup_prefix" This specifies that only archives with the prefix should be considered. For example, if you back up multiple things (file system and database) into differntly named archives (fs\-* and db\-*), this can be used to only consider file system archives to keep the database size small. In the example you'd set the setting to "fs\-". An empty string considers all archives. Default: "" .ie n .IP $cache_path_base 4 .el .IP \f(CW$cache_path_base\fR 4 .IX Item "$cache_path_base" This defaults to "\f(CW$XDG_CACHE_HOME\fR/borg\-restore.pl". It contains the lookup database. .ie n .IP @backup_prefixes 4 .el .IP \f(CW@backup_prefixes\fR 4 .IX Item "@backup_prefixes" This is an array of prefixes that need to be added or removed when looking up a file in the backup archives. If you use filesystem snapshots and the snapshot for /home is located at /mnt/snapshots/home, you have to add the following: .Sp # In the backup archives, /home has the path /mnt/snapshots/home {regex => "^/home/", replacement => "mnt/snapshots/home/"}, .Sp The regex must always include the leading slash and it is suggested to include a tailing slash as well to prevent clashes with directories that start with the 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. .Sp If you create a backup of /home/user only, you will need to use the following: .Sp # In the backup archives, /home/user/foo has the path foo {regex => "^/home/user", replacement => ""}, .ie n .IP $sqlite_cache_size 4 .el .IP \f(CW$sqlite_cache_size\fR 4 .IX Item "$sqlite_cache_size" Default: 102400 .Sp 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. .ie n .IP $prepare_data_in_memory 4 .el .IP \f(CW$prepare_data_in_memory\fR 4 .IX Item "$prepare_data_in_memory" Default: 0 .Sp 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. .Sp New in version 3.2.0. Deprecated in v3.2.0 for future removal possibly in v4.0.0. .SS "Example Configuration" .IX Subsection "Example Configuration" .Vb 11 \& $borg_repo = "/path/to/repo"; \& $backup_prefix = ""; \& $cache_path_base = "/mnt/somewhere/borg\-restore.pl\-cache"; \& @backup_prefixes = ( \& {regex => "^/home/", replacement => "mnt/snapshots/home/"}, \& # /boot is not snapshotted \& {regex => "^/boot/", replacement => "boot"}, \& {regex => "^/", replacement => "mnt/snapshots/root/"}, \& ); \& $sqlite_cache_size = 2097152; \& $prepare_data_in_memory = 0; \& \& 1; #ensure positive return value .Ve .SH LICENSE .IX Header "LICENSE" Copyright (C) 2016\-2018 Florian Pritz .PP Licensed under the GNU General Public License version 3 or later. See LICENSE for the full license text.