=head1 OmniPITR - Installation =head2 INSTALLATION You can get the OmniPITR project from L. Within this directory you will find set of directories: =over =item * bin/ This is where the scripts reside - usually this is the only place you need to look into. =item * doc/ Documentation. In Plain Old Documentation format, so you can view it practically everywhere Perl is with I command. =item * lib/ Here be dragons. Don't look. Don't touch. Be afraid. =back After fetching the omnipitr project/directory, put it in any place in your filesystem you'd want. Usually you will keep all of these together, but you can always remove the docs, put the scripts in some system bin/ directory, and put libs anyplace you want - just make sure that path to them is in I environment variable. In case you will not decide to split the distribution - i.e. you will have someplace in your system I directory, which will contain I and I directories (just like it is distributed) - you don't have to set I - scripts will automatically find their libs. =head2 REQUIREMENTS Standard Perl distribution should be enough. On some Linux systems (Debian, Ubuntu) core Perl modules have been packaged separately - in such case you need to install also perl-modules package. Additionally, you will need some programs installed: =over =item * nice =item * rsync =item * tar (it has to be GNU tar version 1.20 or newer) =back Additionally, you might want to use compression, in which case you need I, I or I compression programs. Please note that you can use I to get faster, but gzip-compatible, compression. To do so, specify all destinations/sources using I prefix, but add --gzip-path option with value pointing to I program. =head2 SANITY CHECK After installation it's good to run I script (from I) directory - it will check if all prerequisites are available. Output might look like this: postgres@server:~$ omnipitr/bin/sanity-check.sh Checking: - /var/lib/postgres/omnipitr/bin - /var/lib/postgres/omnipitr/lib 5 programs, 7 libraries. All checked, and looks ok. or like this: postgres@server:~$ omnipitr/bin/sanity-check.sh Checking: - /var/lib/postgres/omnipitr/bin - /var/lib/postgres/omnipitr/lib 5 programs, 7 libraries. Warnings: - you don't have ssh program available - you don't have rsync program available - your Perl is old (we support only 5.8 or newer. OmniPITR might work, but was not tested on your version of Perl) Errors: - you don't have any of programs used to transmit WAL files (ssh, rsync) - you don't have POSIX Perl library (should be installed together with Perl) All checked. 3 warnings, 2 errors. Depending on your particular usecase even the errors don't have to be fatal - for example, if your I/I binary is in directory that is not in I<$PATH> - it will not be found by sanity-check.sh, but you can always provide paths to them via I<--rsync-binary> or I<--ssh-binary> options to I scripts. After I returned C you should be good with starting using the scripts. =head2 INITIAL SETUP To start Wal replication you will need to: =over =item 1. Start archiving wal segments: I =item 2. Make initial hot backup on master: I =item 3. Transfer the backup to slave server(s) =item 4. Uncompress backup using normal tar commands. =item 5. Start PostgreSQL recovery from hot-backup: I =back Alternativaly steps 2-4 can be replaced by usage of I tool. Afterwards you can/should monitor replication parameters with I, and that would be all. Of course you can do hot-backups on slave (with I) at any moment - just remember that doing them on slave requires more disc space - details in I. =head2 HINTS It is technically possible, and suggested to use the same logfiles for all programs running on given server. That is - you can setup archival to log to "archive.log" and backup to log to "backup.log", but you can make them both log to "omnipitr.log" - it will not break anything, and makes it simpler to manage log files. Same thing applies to state directories - these can be the same between various programs from I package. When creating any files I obeys ulimit, but doesn't enforce any additional restrictions. So, if you'd like it to create files that are readable only to owner, simply run it like this: umask 0077; omnipitr-something .... =head2 COPYRIGHT The OmniPITR project is Copyright (c) 2009-2013 OmniTI. All rights reserved.