From: Enio Schutt Junior <enio@pmpf.rs.gov.br>
To: pgsql-admin@postgresql.org
Subject: Backup procedure
Date: Wed, 13 Aug 2003 14:11:31 -0300
Message-ID: <001a01c361bd$f134d2f0$e205000a@compaq> (raw)
Hi,
According to some answers about the consistency of a database in a snapshot of a whole
HD (excluding proc, tmp, and dev, of course) and without stopping the postmaster service,
it is said it should work because it's like if the system has crashed, so restoring files from
the HD and starting the server would be ok.
According to postgresql administrator's guide, section 9.2 (File system level backup),
item #1: "The database server *must* be shutdown in order to get a usable backup. Half-way
measures such as disallowing all connections will not work as there is always some buffering
going on. For this reason it is also not advisable to trust file systems that claim to support
"consistent snapshots" ".
Assuming the admin's guide is a "little bit more" right, my backup restore procedure would
be as follows:
1-Restore data from the backup Hd into a new Hd.
2-Copy some files from /usr/local/pgsql/data like postgresql.conf, pg_hba.conf, pg_ident.conf,
and some other authentication files whose names appear in pg_hba.conf (I suspect PG_VERSION and
postmaster.opts would not be needed as initdb should create these files) to another directory.
3-Remove the entire /usr/local/pgsql/data directory
4-Run initdb -D "/usr/local/pgsql/data"
5-Copy those files back to /usr/local/pgsql/data
6-Start the server
7-Restore information generated by pg_dump (tables) and pg_dumpall -g (users and groups)
Would this work well? I know there are other procedures and I would be pleased to know that
this procedure works fine.
Thanks in advance,
Enio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: enio@pmpf.rs.gov.br
Subject: Re: Backup procedure
In-Reply-To: <001a01c361bd$f134d2f0$e205000a@compaq>
References: <001a01c361bd$f134d2f0$e205000a@compaq>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox