X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 86C9FD1B56C for ; Wed, 13 Aug 2003 17:13:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 48799-01 for ; Wed, 13 Aug 2003 14:11:34 -0300 (ADT) Received: from mail.passofundo.rs.gov.br (unknown [200.182.187.131]) by svr1.postgresql.org (Postfix) with ESMTP id 69C9AD1C4BF for ; Wed, 13 Aug 2003 14:12:41 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.passofundo.rs.gov.br (Postfix) with ESMTP id 5C1D046E23 for ; Wed, 13 Aug 2003 14:07:48 -0300 (BRT) Received: from compaq (unknown [10.0.5.226]) by mail.passofundo.rs.gov.br (Postfix) with SMTP id CDB6446E1A for ; Wed, 13 Aug 2003 14:07:45 -0300 (BRT) Message-ID: <001a01c361bd$f134d2f0$e205000a@compaq> From: "Enio Schutt Junior" To: Subject: Backup procedure Date: Wed, 13 Aug 2003 14:11:31 -0300 Organization: pmpf MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C361A4.CB9905C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200308/159 X-Sequence-Number: 9881 This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C361A4.CB9905C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, According to some answers about the consistency of a database in a snapshot= of a whole=20 HD (excluding proc, tmp, and dev, of course) and without stopping the postm= aster service,=20 it is said it should work because it's like if the system has crashed, so r= estoring files from=20 the HD and starting the server would be ok. According to postgresql administrator's guide, section 9.2 (File system lev= el backup),=20 item #1: "The database server *must* be shutdown in order to get a usable b= ackup. Half-way=20 measures such as disallowing all connections will not work as there is alwa= ys some buffering=20 going on. For this reason it is also not advisable to trust file systems th= at claim to support=20 "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.c= onf, pg_ident.conf,=20=20 and some other authentication files whose names appear in pg_hba.conf (I su= spect PG_VERSION and=20 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 (user= s and groups) Would this work well? I know there are other procedures and I would be plea= sed to know that this procedure works fine.=20 Thanks in advance, Enio ------=_NextPart_000_0017_01C361A4.CB9905C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
According to some answers about the consis= tency of=20 a database in a snapshot of a whole
HD (excluding proc, tmp, and dev, of=20 course) and without stopping the postmaster service,
it is said it should work because it's lik= e=20 if th= e system has=20 crashed, so restoring files from
the HD and starting the server would be=20 ok.
 
According to postgresql administrator's gu= ide,=20 section 9.2 (File system level backup),
item #1: "The database server *must* be sh= utdown in=20 order to get a usable backup. Half-way
measures such as disallowing all connectio= ns will=20 not work as there is always some bu= ffering=20
going on. For this reason it is also not a= dvisable=20 to trust file systems that claim to supp= ort=20
"consistent snapshots" ".
 
Assuming the admin's guide is a "little bi= t more"=20 right, my backup restore procedure would
be as follows:
 
1-Restore data from the backup Hd into a n= ew=20 Hd.
2-Copy some files from /usr/local/pgsql/data like postgresql.conf,= =20 pg_hba.conf, pg_ident.conf, 
and some other authentication files w= hose=20 names appear in pg_hba.conf (I suspect PG_VERSION and
postmaster.opts would not be needed as ini= tdb=20 should create these files) to another directory.
3-Remove the entire=20 /usr/local/pgsql/data directory
4-Run initdb -D=20 "/usr/local/pgsql/data"
5-Copy those files back to=20 /usr/local/pgsql/data
6-Start the server
7-Restore information genera= ted=20 by pg_dump (tables) and pg_dumpall -g (users and groups)
 
Would this work well? I know there are oth= er=20 procedures and I would be pleased to know that
this procedure works fine. 
 
Thanks in advance,
Enio
------=_NextPart_000_0017_01C361A4.CB9905C0--