summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-02-07Support borg list --prefix option via settingFlorian Pritz4-4/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07DB/remove_archive: Properly handle cases where the DB is empty after removalFlorian Pritz3-7/+64
Empty here means that the DB does not contain any backup archive information because all information that is already in the db has to be removed. The old code tries to copy existing data into the new table, but since there are no archives to copy data for, the sql query fails. Also, it would copy all rows and only populate the path column, but if there are no archives that have timestamps, that's actually useless work. This patch ensures that the table is kept empty if there are no archives. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07t/handle_added_archives: Document weird testFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-02-07t/handle_added_archives: Add test for removal of archivesFlorian Pritz1-0/+23
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-11-12Enable trace logging in BEGIN block for test suiteFlorian Pritz1-4/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-11-01Checking in changes prior to tagging of version 3.2.1.Florian Pritz3-2/+5
Changelog diff is: diff --git a/Changes b/Changes index b9b6218..dae2435 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ Revision history for Perl extension App-BorgRestore {{$NEXT}} +3.2.1 2018-11-01T12:54:26Z + - Add missing version requirement to List::Util dependency + 3.2.0 2018-09-19T11:46:35Z - Write data directly to DB instead of preparing it in memory first. The new algorithm should be faster and uses constant memory. If you want the
2018-11-01capnfile: Add minimum List::Util versionFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-19Checking in changes prior to tagging of version 3.2.0.Florian Pritz3-2/+4
Changelog diff is: diff --git a/Changes b/Changes index bd95acb..b9b6218 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Perl extension App-BorgRestore {{$NEXT}} + +3.2.0 2018-09-19T11:46:35Z - Write data directly to DB instead of preparing it in memory first. The new algorithm should be faster and uses constant memory. If you want the old one back for any reason look at the '$prepare_data_in_memory' config
2018-09-13Change prepare_data_in_memory default to 0 to enable direct-to-dbFlorian Pritz2-5/+10
Also instantly deprecate the option since it is only a short term fix in case someone notices problems with the new code. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-13handle_added_archives_with_db.t: Add file that is removed in second backupFlorian Pritz1-0/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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-12handle_added_archives_with_db.t: Add 2nd top level directory to testFlorian Pritz1-0/+21
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-09Test if adding an archive updates existing rows correctlyFlorian Pritz1-0/+79
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09handle_added_archives_with_db.t: Extend to verify that PathTimeTable/DB ↵Florian Pritz1-0/+10
caching doesn't cause problems 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-09handle_added_archives_with_db.t: Use new_no_defaults instead of newFlorian Pritz1-3/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Update META.jsonFlorian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Use strictures instead of strict/warningsFlorian Pritz20-37/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Sort cpanfileFlorian Pritz1-5/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Get settings via hash instead of direct variable accessFlorian Pritz3-24/+26
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09Settings: Add constructorsFlorian Pritz2-12/+27
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-09Simplify BorgRestore constructorsFlorian Pritz1-8/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-09BorgRestore: Move dependencies to dedicated $self->{deps} keyFlorian Pritz1-28/+28
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-08Update META.jsonFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-08Add TAP log adapter to all testsFlorian Pritz8-1/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06t/handle_added_archives: Check for paths that should not be part of the dbFlorian Pritz1-0/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Test handled_added_archives with Memory and DB storageFlorian Pritz1-30/+35
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Update copyright yearsFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Add direct-to-db adding of paths instead of memory onlyFlorian Pritz5-10/+101
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Extract lookup table into dedicated packageFlorian Pritz2-43/+71
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-09-06Add handle_added_archives db testFlorian Pritz1-0/+42
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-25Checking in changes prior to tagging of version 3.1.0.3.1.0Florian Pritz3-4/+7
Changelog diff is: diff --git a/Changes b/Changes index a4b127d..a7d4b7b 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Perl extension App-BorgRestore {{$NEXT}} + +3.1.0 2018-08-25T09:46:27Z - Add --json option - Add --detail option - Log cache update status message per archive to INFO
2018-08-19print_archive_list: Fix incorrect counter valuesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Test compilation of all packagesFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Reorganize testsFlorian Pritz11-0/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19t/find_archives: Check exception stringFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Sort cpanfileFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-19Add search_path and find_archives integration testsFlorian Pritz4-0/+91
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>