make_data_archive()

Wraps all work necessary to make local .tar files (optionally compressed) with content of PGDATA

make_xlog_archive()

Wraps all work necessary to make local .tar files (optionally compressed) with xlogs required to start PostgreSQL from backup.

wait_for_final_xlog_and_remove_dst_backup()

In PostgreSQL < 8.4 pg_stop_backup() finishes before .backup "wal segment" is archived.

So we need to wait till it appears in backup xlog destination before we can remove symlink.

compress_xlogs()

Wrapper function which encapsulates all work required to compress xlog segments that accumulated during backup of data directory.

compress_pgdata()

Wrapper function which encapsulates all work required to compress data directory.

stop_pg_backup()

Runs pg_stop_backup() PostgreSQL function, which is crucial in backup process.

This happens after data directory compression, but before compression of xlogs.

This function also removes temporary destination for xlogs (dst-backup for omnipitr-archive).

start_pg_backup()

Executes pg_start_backup() postgresql function, and (before it) creates temporary destination for xlogs (dst-backup for omnipitr-archive).

DESTROY()

Destructor for object - removes created destination for omnipitr-archive, and issues pg_stop_backup() to database.

read_args()

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

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.