=head1 OmniPITR - omnipitr-cleanup =head2 USAGE /some/path/omnipitr/bin/omnipitr-cleanup [options] %r Options: =over =item --archive (-a) Where archived wal segments are kept. Check L for more details. =item --log (-l) Name of logfile (actually template, as it supports %% L markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% macros directly. Instead - any occurence of ^ character in log dir will be first changed to %, and later on passed to strftime. Please note that on some systems (Solaris for example) default shell treats ^ as special character, which requires you to quote the log filename (if it contains ^ character). So you'd better write it as: --log '/var/log/omnipitr-^Y-^m-^d.log' =item --pid-file Name of file to use for pidfile. If it is specified, than only one copy of I (with this pidfile) can run at the same time. Trying to run second copy of I will result in an error. =item --verbose (-v) Log verbosely what is happening. =item --removal-pause-trigger (-p) Path to file, which, if exists, causes I to not do any removal - for example when running I. =item --version (-V) Prints version of I, and exists. =item --help (-?) Prints this manual, and exists. =item --config-file (--config / --cfg) Loads options from config file. Format of the file is very simple - each line is treated as argument with optional value. Examples: --verbose --host 127.0.0.1 -h=127.0.0.1 --host=127.0.0.1 It is important that you don't need to quote the values - value will always be up to the end of line (trailing spaces will be removed). So if you'd want, for example, to have magic-option set to "/mnt/badly named directory", you'd need to quote it when setting from command line: /some/omnipitr/program --magic-option="/mnt/badly named directory" but not in config: --magic-option=/mnt/badly named directory Empty lines, and comment lines (starting with #) are ignored. =back =head2 DESCRIPTION Call to I should be in I variable in I. Which options should be given depends only on installation, but generally you will need: =over =item * --archive =item * --log =back And of course the %r at the end. This script is used only in cases of streaming replication, as in case of wal-file based replication L can remove obsolete wal files. =head3 Archive specification If the wal segments are compressed you have to prefix archive path with compression type followed by '=' sign. Allowed compression types: =over =item * gzip Used file extension is .gz =item * bzip2 Used file extension is .bz2 =item * lzma Used file extension is .lzma =item * lz4 Used file extension is .lz4 =item * xz Used file extension is .xz =back =head2 EXAMPLES =head3 Minimal setup: archive_cleanup_command='/.../omnipitr-cleanup -l /var/log/omnipitr/cleanup.log -a /mnt/wal_restore/ %r' =head3 Minimal setup, for gzip-compressed archives: archive_cleanup_command='/.../omnipitr-cleanup -l /var/log/omnipitr/cleanup.log -a gzip=/mnt/wal_restore/ %r' =head2 COPYRIGHT The OmniPITR project is Copyright (c) 2009-2013 OmniTI. All rights reserved.