X-Original-To: pgsql-php@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id D09B3925829 for ; Wed, 28 May 2003 12:28:36 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 73624-06 for ; Wed, 28 May 2003 12:28:35 -0400 (EDT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by developer.postgresql.org (Postfix) with ESMTP id AB9B492581D for ; Wed, 28 May 2003 12:28:34 -0400 (EDT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.9/8.12.9) with ESMTP id h4SGRXQB022098; Wed, 28 May 2003 10:27:33 -0600 (MDT) Date: Wed, 28 May 2003 10:12:46 -0600 (MDT) From: "scott.marlowe" To: andhie adam Cc: Subject: Re: Please help me ? In-Reply-To: <20030528160407.18650.qmail@linuxmail.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailScanner: Found to be clean X-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/51 X-Sequence-Number: 2056 On Thu, 29 May 2003, andhie adam wrote: > > Dear All > > I'am new user in postgresql, i want to ask some questions. please helpme ?? > > I have two computer A (this is server ) and computer B (this is server > for backup). > I want to backup database Postgresql automatically from computer A to > computer B. > I dont want to manual restore database from computer B. I want always > automatic syncronicer for saerver database for backup. Well, there's a couple of things you can do. One is to use replication. There are several replication methods out there. They make sure that any change on the master server gets propogated to the slave server. the other possibility is a "hot backup" which is a box that gets a dump from the master server each night, but doesn't get updates throughout the day. This is more of a failover for catastrophic failure kind of box. To backup from one box to the other, you need to have tcp_sockets turned on in postgresql.conf, and pg_hba.conf needs to be configured to let you connect remotely from the other machine. Then, on the slave box, you can do this: pg_dumpall -h masterbox | psql template1 This will run pretty fast. On a machine with simple data, you can backup a couple of gigabytes an hour easy that way. You can write a script that goes in and drops all the databases locally, then runs the above one liner and cron it up to run at midnight or whatnot.