diff options
Diffstat (limited to 'lib/App/BorgRestore/Settings.pm')
-rw-r--r-- | lib/App/BorgRestore/Settings.pm | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/App/BorgRestore/Settings.pm b/lib/App/BorgRestore/Settings.pm index 2aea1ae..81c2cac 100644 --- a/lib/App/BorgRestore/Settings.pm +++ b/lib/App/BorgRestore/Settings.pm @@ -153,6 +153,21 @@ method new_no_defaults($class: $deps = {}) { return $self; } +method get_config() { + return { + borg => { + repo => $borg_repo, + path_prefixes => [@backup_prefixes], + }, + cache => { + base_path => $cache_path_base, + database_path => "$cache_path_base/v3/archives.db", + prepare_data_in_memory => $prepare_data_in_memory, + sqlite_memory_cache_size => $sqlite_cache_size, + } + }; +} + fun load_config_files() { my @configfiles; @@ -173,23 +188,10 @@ fun load_config_files() { } } -fun get_cache_base_dir_path($path) { +method get_cache_base_dir_path($path) { return "$cache_path_base/$path"; } -fun get_cache_dir() { - return "$cache_path_base/v3"; -} - -fun get_cache_path($item) { - return get_cache_dir()."/$item"; -} - -fun get_db_path() { - return get_cache_path('archives.db'); -} - - 1; __END__ |