diff options
author | Florian Pritz <bluewind@xinu.at> | 2019-02-07 17:01:28 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2019-02-07 17:14:35 +0100 |
commit | 4034169f9655ea6b28741067c58c0219e42365e1 (patch) | |
tree | 9a76c3c328d7420ec4dc2494889800823ab21ac2 /lib/App/BorgRestore/Settings.pm | |
parent | 138ba53c92dc10c1b9b9bb31448b76f9bbac0ecd (diff) | |
download | App-BorgRestore-4034169f9655ea6b28741067c58c0219e42365e1.tar.gz App-BorgRestore-4034169f9655ea6b28741067c58c0219e42365e1.tar.xz |
Support borg list --prefix option via setting
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/BorgRestore/Settings.pm')
-rw-r--r-- | lib/App/BorgRestore/Settings.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index 9ef03d7..bc4fbd0 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -47,6 +47,14 @@ This specifies the URL to the borg repo as used in other borg commands. If you use the $BORG_REPO environment variable set this to an empty string. Default: "backup:borg-".hostname; +=item C<$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: "" + =item C<$cache_path_base> This defaults to "C<$XDG_CACHE_HOME>/borg-restore.pl". It contains the lookup database. @@ -97,6 +105,7 @@ New in version 3.2.0. Deprecated in v3.2.0 for future removal possibly in v4.0.0 =head2 Example Configuration $borg_repo = "/path/to/repo"; + $backup_prefix = ""; $cache_path_base = "/mnt/somewhere/borg-restore.pl-cache"; @backup_prefixes = ( {regex => "^/home/", replacement => "mnt/snapshots/home/"}, @@ -129,6 +138,7 @@ our @backup_prefixes = ( ); our $sqlite_cache_size = 102400; our $prepare_data_in_memory = 0; +our $backup_prefix = ""; method new_no_defaults($class: $deps = {}) { my $self = {}; @@ -157,6 +167,7 @@ method get_config() { return { borg => { repo => $borg_repo, + backup_prefix => $backup_prefix, path_prefixes => [@backup_prefixes], }, cache => { |