Main function, called by actual script in bin/, wraps all work done by script with the sole exception of reading and validating command line arguments.

These tasks (reading and validating arguments) are in this module, but they are called from OmniPITR::Program::new()

Name of called method should be self explanatory, and if you need further information - simply check doc for the method you have questions about.


Scans archive directory, and returns names of all files, which are "older" than last required segment (given as argument on command line)

Older - is defined as alphabetically smaller than required segment.


Function which does all the parsing, and transformation of command line arguments.

It also verified base facts about passed WAL segment name, but all other validations, are being done in separate function: validate_args().



Does all necessary validation of given command line arguments.

One exception is for compression programs paths - technically, it could be validated in here, but benefit would be pretty limited, and code to do so relatively complex, as compression program path might, but doesn't have to be actual file path - it might be just program name (without path), which is the default.