turn pitr 'on' on PostgreSQL 8.2 - pg_standby - Mailing list pgsql-admin
From | Renato Oliveira |
---|---|
Subject | turn pitr 'on' on PostgreSQL 8.2 - pg_standby |
Date | |
Msg-id | 7965A9DCF12CC14984420BCC37B1608F25ABF310AB@Elzar.grant.co.uk Whole thread Raw |
Responses |
Re: turn pitr 'on' on PostgreSQL 8.2 - pg_standby
|
List | pgsql-admin |
Dear all,
I have been playing with PITR on version 8.3 so far, but I need to get it working on version 8.2.
What is the difference between:
archive_command = on (is this command for 8.2?)
archive_mode = on (This one is for 8.3!)
I need to enable ‘archive_mode = on’, restart postgres, before I can do the base backup, is that correct?
In order to bring the standby online I need a trigger file, something like:
can I call the trigger file whatever I want? for example; ‘/var/log/postgres/postgresql.8.2.trigger’
Postgres 8.2 config
Master:
Postgresql.conf
archive_command = on
archive_command = 'cp -i %p /mnt/pitr/%f </dev/null'
archive_timeout = 60
# mkdir /mnt/pitr
# chown postgres: /mnt/pitr (this will be an NFS mount point)
# mount –t nfs fnsserver01:/pitr /mnt/pitr
# service postgresql restart
# su – postgres
# psql –U postgres
SELECT pg_start_backup('pitr_backup');
\q
# Tar –cvf pg_data.tar /usr/loca/pgsql/data
# Psql –U postgres
SELECT pg_stop_backup();
# cp pg_data.tar /mnt/pitr
Postgres 8.2 config
StandBy:
# Compile pg_standy from the contrib/ folder
# cd /usr/local/pgsql
# rm –rf data/
# tar –xvf /mnt/pitr/pg_data.tar
# chown –R postgres: data
# cd data/
# cd pg_xlog/ - delete the content
# cd ../data
# touch recovery.conf
restore_command = 'pg_standby -l -d -s 2 -t /var/log/postgres/ postgresql.8.2.trigger /mnt/pitr/ %f %p %r 2>>pitr_standby.log'
Postgresql.conf
#archive_command = off - disabled and commented out
#archive_command = '' – disabled and command removed
# archive_timeout = 60 – disabled
Is this correct, am I missing something or anything here isn’t correct?
If anyone could give me some light with this it would be very much appreciated.
Thank you very much
Renato
Systems Administrator
e-mail: renato.oliveira@grant.co.uk
Company registered in England, registration number 658133
Registered office address:
29 Station Road,
Shepreth,
CAMBS SG8 6GB
UK
P Please consider the environment before printing this email
pgsql-admin by date: