summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-04-02Log die() and warn() callsFlorian Pritz1-0/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Ensure log4perl dependencies are included in use statementsFlorian Pritz1-1/+3
https://metacpan.org/pod/Log::Log4perl::FAQ#How-come-PAR-(Perl-Archive-Toolkit)-creates-executables-which-then-can't-find-their-Log::Log4perl-appenders? Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Improve debug messages in find_archivesFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Standardize error level for functions in main packageFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Use Carp for find_archives errorsFlorian Pritz2-6/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Use Carp for path resolving errorFlorian Pritz2-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Add TODOFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Move backup path mapping to main packageFlorian Pritz2-10/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Move path resolving to main packageFlorian Pritz2-8/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Fix unhandleted formatting in invalid path error messageFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Fix width of milliseconds in debug log formatFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Refactor update_cache()Florian Pritz1-18/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Change default log level to INFOFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Improve log messages when adding archivesFlorian Pritz1-2/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Use logger everywhere in main packageFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Start documenting the main classFlorian Pritz2-2/+28
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02script: Abort early if path is not found in backupsFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02script: Print fatal errors using loggerFlorian Pritz1-4/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-02Use Log4perl for loggingFlorian Pritz3-2/+24
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Fix codingstyleFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Mark some functions privateFlorian Pritz3-21/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Remove unused get_temp_pathFlorian Pritz1-11/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01Remove unused get_mtime_from_lookuptableFlorian Pritz1-17/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-04-01fixup! Do not pass $opts to main classFlorian Pritz1-1/+1
2017-04-01Do not pass $opts to main classFlorian Pritz4-10/+4
The only reason this was done, was for the debug output. This no longer requires large amounts of memory or time (simple count(*) in the db now) so this is no longer necessary. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-19Update META.jsonFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-19Fix broken db handling when updating cacheFlorian Pritz1-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-19Fix undefined $log in scriptFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-19Migrate main package to Log::AnyFlorian Pritz1-20/+16
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-13Use Log::Any in scriptFlorian Pritz1-1/+9
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-13Refactor db creation and cache dir creationFlorian Pritz4-23/+34
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-13Fix 02_parsing.tFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-13timespec_to_seconds: Use atomic groups in regexFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-12Fix sort order of detected archivesFlorian Pritz2-1/+30
cmp sorts strings, <=> sorts numbers Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-12Use POSIX::strftime instead of DateTimeFlorian Pritz1-4/+2
DateTime take forever to load (~115ms on my machine) and it's not required here. Removing it makes the usage text appear much faster. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-12Make $db an object variableFlorian Pritz1-36/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Add new_no_defaults constructor for test suiteFlorian Pritz2-1/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Test timespec_to_secondsFlorian Pritz1-0/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Add cpanfile.snapshotFlorian Pritz1-0/+66
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Test adding of new archivesFlorian Pritz3-0/+51
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-04Borg::list_archive: Use open() instead of IPC::Run for performanceFlorian Pritz2-3/+9
Surprisingly the callback isn't actually that bad, but IPC::Run (probably new_chunker) adds quite some overhead. Since open supports everything we need, use that instead. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-03Fix broken recursion in save_nodeFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-03Pass sub to IPC::Run instead of using a typeglobFlorian Pritz2-7/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-03Add test deps to cpanfileFlorian Pritz2-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-03Support dependency injection of Borg classFlorian Pritz2-3/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-03-02Allow dots in archive namesFlorian Pritz2-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-27Drop useless =podFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-27Move most code to main packageFlorian Pritz2-346/+364
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-27Move debug() to main packageFlorian Pritz2-6/+26
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2017-02-27Test Helper::untaint_archive_nameFlorian Pritz1-0/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>