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 75DCED1C9A6 for ; Fri, 8 Aug 2003 18:01:06 +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 62437-10 for ; Fri, 8 Aug 2003 14:59:37 -0300 (ADT) Received: from mail.passofundo.rs.gov.br (unknown [200.182.187.131]) by svr1.postgresql.org (Postfix) with ESMTP id 0CAE1D1C91F for ; Fri, 8 Aug 2003 15:00:46 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.passofundo.rs.gov.br (Postfix) with ESMTP id 1D5EC46E25 for ; Fri, 8 Aug 2003 14:56:01 -0300 (BRT) Received: from compaq (unknown [10.0.5.226]) by mail.passofundo.rs.gov.br (Postfix) with SMTP id 43A6E46E22 for ; Fri, 8 Aug 2003 14:55:59 -0300 (BRT) Message-ID: <000c01c35dd6$d62b43d0$e205000a@compaq> From: "Enio Schutt Junior" To: Subject: Backup routine Date: Fri, 8 Aug 2003 14:59:39 -0300 Organization: pmpf MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01C35DBD.B0C3CD10" 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=1.5 tagged_above=0.0 required=5.0 tests=HTML_20_30 X-Spam-Level: * X-Archive-Number: 200308/124 X-Sequence-Number: 9846 This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C35DBD.B0C3CD10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Here, where I work, the backups of the postgresql databases are being done = the following way: There is a daily copy of nearly all the hd (excluding /tmp, /proc, /dev and= so on) in which databases are=20 and besides this there is also one script which makes the pg_dump of each o= ne of the databases on the server. This daily copy of the hd is made with postmaster being active (without sto= pping the daemon), so the data from /usr/local/pgsql/data would not be 100% consistent, I guess.=20 Supposing there was a failure and it was needed to restore the whole thing,= I think the procedure to recovery would be the following: 1) Copy data from the backup hd to a new hd 2) Once this was done, delete the postmaster.pid file and start the postmas= ter service 3) Drop all databases and recreate them from those pg_dump files There are some questions I have about this backup routine: If I recover data from that "inconsistent" backup hd, I know that the binar= y files (psql, pg_dump and so on) will remain ok. The data may have some inconsistencies. Would these inconsi= stencies let the postmaster start and work properly (that is, even with the possible presence of incons= istent data) Would it start and be able to work normally and keep the information about users and groups? I= am talking about users and groups information because these ones are not dumped by pg_dump. I was thin= king about using=20 "pg_dump -g" to generate this information. I was also thinking about excluding /usr/local/pgsql/data from the backup r= outine, as the data is also in other files generated by pg_dump. The problem is that this director= y has not only the databases data but also some config files, like postgresql.conf. Opinions are welcome. ------=_NextPart_000_0009_01C35DBD.B0C3CD10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
Here, where I work, the backups of the pos= tgresql=20 databases are being done the following way:
There is a daily copy of nearly all the hd= =20 (excluding /tmp, /proc, /dev and so on) in which databases are
and besides this there is also one script which makes the pg_dump of each one of the= =20 databases on the server.
This daily copy of the hd is made with pos= tmaster=20 being active (without stopping the daemon), so the data
from /usr/local/pgsql/data would not be 10= 0%=20 consistent, I guess.
Supposing there was a failure and it was n= eeded to=20 restore the whole thing, I think the procedure to
recovery would be=20 the following:
1) Copy data from the backup hd to a new= =20 hd
2) Once this was done, delete the=20 postmaster.pid file and start the postmaster service
3) Drop all databases and recreate th= em from=20 those pg_dump files
 
There are some questions I have about this= backup=20 routine:
If I recover data from that "inconsistent"= backup=20 hd, I know that the binary files (psql, pg_dump and so on)
will remain ok. The data may have some=20 inconsistencies. Would these inconsistencies let the postmaster
start and work properly (that is, even wit= h the=20 possible presence of inconsistent data) Would it start and
be able to work normally and keep the info= rmation=20 about users and groups? I am talking about users and
groups information because these ones are = not=20 dumped by pg_dump. I was thinking about using
"pg_dump -g" to generate this=20 information.
 
I was also thinking about excluding=20 /usr/local/pgsql/data from the backup routine, as the data is
also in other files generated by pg_dump. = The=20 problem is that this directory has not only the databases
data but also some config files, like=20 postgresql.conf.
 
Opinions are welcome.
<= /HTML> ------=_NextPart_000_0009_01C35DBD.B0C3CD10--