root/trunk/omnipitr/doc/install.pod

Revision 57, 3.2 kB (checked in by depesz, 4 years ago)

initial version of first part of docs of upcoming walreplication/backup system

Line 
1 =head1 OmniPITR - Installation
2
3 =head2 INSTALLATION
4
5 You can get the OmniPITR project from L<https://labs.omniti.com/pgsoltools/trunk/omnipitr>. Within this directory you will find set of directories:
6
7 =over
8
9 =item * bin/
10
11 This is where the scripts reside - usually this is the only place you need to
12 look into.
13
14 =item * doc/
15
16 Documentation. In Plain Old Documentation format, so you can view it practically
17 everywhere Perl is with I<perldoc> command.
18
19 =item * lib/
20
21 Here be dragons. Don't look. Don't touch. Be afraid.
22
23 =back
24
25 After fetching the omnipitr project/directory, put it in any place in your
26 filesystem you'd want. Usually you will keep all of these together, but you can
27 always remove the docs, put the scripts in some system bin/ directory, and put
28 libs anyplace you want - just make sure that path to them is in I<PERL5LIB>
29 environment variable.
30
31 In case you will not decide to split the distribution - i.e. you will have
32 someplace in your system I<omnipitr> directory, which will contain I<bin/> and
33 I<lib/> directories (just like it is distributed) - you don't have to set
34 I<PERL5LIB> - scripts will automatically find their libs.
35
36 =head2 SANITY CHECK
37
38 After installation it's good to run I<sanity-check.sh> script (from I<bin/>)
39 directory - it will check if all prerequisites are available.
40
41 Output might look like this:
42
43     postgres@server:~$ omnipitr/bin/sanity-check.sh
44     Checking:
45     - /var/lib/postgres/omnipitr/bin
46     - /var/lib/postgres/omnipitr/lib
47     5 programs, 7 libraries.
48     All checked, and looks ok.
49
50 or like this:
51
52     postgres@server:~$ omnipitr/bin/sanity-check.sh
53     Checking:
54     - /var/lib/postgres/omnipitr/bin
55     - /var/lib/postgres/omnipitr/lib
56     5 programs, 7 libraries.
57     Warnings:
58     - you don't have ssh program available
59     - you don't have rsync program available
60     - your Perl is old (we support only 5.8 or newer. OmniPITR might work, but was not tested on your version of Perl)
61     Errors:
62     - you don't have any of programs used to transmit WAL files (ssh, rsync)
63     - you don't have POSIX Perl library (should be installed together with Perl)
64     All checked. 3 warnings, 2 errors.
65
66 Depending on your particular usecase even the errors don't have to be fatal -
67 for example, if your I<rsync>/I<ssh> binary is in directory that is not in
68 I<$PATH> - it will not be found by sanity-check.sh, but you can always provide
69 paths to them via I<--rsync-binary> or I<--ssh-binary> options to I<omnipitr-*>
70 scripts.
71
72 After I<sanity-check.sh> returned C<All checked, and looks ok.> you should be
73 good with starting using the scripts.
74
75 =head2 INITIAL SETUP
76
77 To start Wal replication you will need to:
78
79 =over
80
81 =item 1. Start archiving wal segments: I<omnipitr-archive>
82
83 =item 2. Make initial hot backup on master: I<omnipitr-master-backup>
84
85 =item 3. Transfer the backup to slave server(s)
86
87 =item 4. Start PostgreSQL recovery from hot-backup: I<omnipitr-restore>
88
89 =back
90
91 Afterwards you can/should monitor replication parameters with
92 I<omnipitr-monitor>, and that would be all. Of course you can do hot-backups on
93 slave (with I<omnipitr-slave-backup>) at any moment - just remember that doing
94 them on slave requires more disc space - details in
95 I<omnipitr-slave-backup.pod>.
96
97 =head2 COPYRIGHT
98
99 The OmniPITR project is Copyright (c) 2009 OmniTI. All rights reserved.
100
Note: See TracBrowser for help on using the browser.