summaryrefslogtreecommitdiffstats
path: root/lib/App/BorgRestore
AgeCommit message (Collapse)AuthorFilesLines
2018-09-12Remove duplicate code by calling add_path in save_nodesFlorian Pritz1-17/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Update cache only when going back up the stack instead of all the timeFlorian Pritz1-9/+13
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Only add top level directory when we actually have a top level directoryFlorian Pritz1-2/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-12Ensure that top level directories are also written to the DBFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-10Remove left over debug log entryFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Use cache as kind of stack and only write to DB when ↵Florian Pritz1-18/+25
removing an item from the stack Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09DB: Fix update_path_if_greater not working for existing rowsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Use constant to control trace loggingFlorian Pritz1-6/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Improve performance by removing usage of regex in hot placesFlorian Pritz1-6/+10
This cuts execution time on my workstation from about 85 seconds for an --update-cache adding one archive to roughly 62 seconds. Measured totally unscientifically by simply running the full application instead of isolating the code, but it makes sense that regexes are slower so I'll take it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Use strictures instead of strict/warningsFlorian Pritz6-12/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Get settings via hash instead of direct variable accessFlorian Pritz1-14/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Settings: Add constructorsFlorian Pritz1-12/+25
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Settings: Pull config file loading into functionFlorian Pritz1-13/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Settings: Use Function::ParametersFlorian Pritz1-6/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09PathTimeTable/DB: Add cache to reduce number of DB callsFlorian Pritz1-2/+51
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Update copyright yearsFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Add direct-to-db adding of paths instead of memory onlyFlorian Pritz4-5/+92
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Extract lookup table into dedicated packageFlorian Pritz1-0/+67
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Remove unused variableFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19DB: Do not create directories for special :foo: DBsFlorian Pritz1-1/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-17Die when XDG_* and HOME env vars are not setFlorian Pritz1-5/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-02Remove sqlite cache size warningFlorian Pritz2-5/+5
The original performance problem on my machine doesn't seem to be reproducable any more so maybe either sqlite got smarter or it was something else entirely. Move the warning to DEBUG and soften the documentation. If it still helps people can use it, but we don't have to annoy them if it doesn't. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-01-24Only increase sqlite cache size during updateFlorian Pritz1-4/+7
While not all operations fill the cache, --list does. However, for read operations it doesn't actually appear to help performance. Limit the large cache setting to update operations only because there it does really increase performance. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-01-24Add --list feature to search for files contained in backups by pathFlorian Pritz1-0/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-12-04Warn if sqlite cache is fullFlorian Pritz1-0/+11
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-12-03Settings: Fix missing indentation in docFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-12-02Properly document removal of prefixes via @backup_prefixesFlorian Pritz1-4/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-26Remove old cacheFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-26Bump cache version levelFlorian Pritz1-1/+1
The previous code didn't support borg 1.1 properly and the cached might now be broken. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-26Use mtime for borg 1.1 instead of isomtimeFlorian Pritz1-1/+1
The rest of the code expects the mtime format, but borg <1.1 mixed up the formats between isomtime and mtime. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-22Log warning if no archives are detected in borg outputFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-22Create cache directory in DB instead of SettingsFlorian Pritz2-4/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21borg_list: Use JSON with borg 1.1Florian Pritz1-5/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21Borg::list_archive: Use --format to please borg 1.1Florian Pritz1-1/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21borg_list_time: Use JSON when possibleFlorian Pritz1-12/+27
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21Borg: Extract version information for future useFlorian Pritz1-0/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21borg_list_time: Fix parsing for borg >=1.1Florian Pritz1-1/+2
Output now contains additional data after the date. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21settings: Document that config must return trueFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-11-21Log borg errors instead of only throwing exceptionFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-25Add missing autodie to packagesFlorian Pritz4-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-09-10Add basic documentation for all packagesFlorian Pritz3-0/+36
Module::Build::Tiny installs manpages for all packages and for these 3 the manpages were empty. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-08-10Bump minimal perl version to 5.14Florian Pritz4-4/+4
Function::Parameters requires >=5.14 so we can bump our version as well. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-06-19Settings: Improve documentation of $borg_repoFlorian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-05-28Add --adhocFlorian Pritz2-0/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-11DB: Fix broken db initializationFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-11DB: Fix opening of missing dbFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-10Remove unused Data::Dumper dependencyFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-10Use Function::Parameters in Helper packageFlorian Pritz1-9/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-10Use Function::Parameters in Borg packageFlorian Pritz1-17/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-10Use Function::Parameters for DB packageFlorian Pritz1-58/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>