Skip site navigation (1) Skip section navigation (2)

Re: 'Hot' backup of PostgreSQL dbases

From: Ognjen Blagojevic <ognjen(at)etf(dot)bg(dot)ac(dot)yu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: 'Hot' backup of PostgreSQL dbases
Date: 2009-05-15 10:16:19
Message-ID: 4A0D40F3.8090504@etf.bg.ac.yu (view raw or flat)
Thread:
Lists: pgsql-novice
Mark wrote:
> I've been using "pg_dumpall -c -o" for a while, but I realize that this is
> no good. After all, for a restore, the PostgreSQL server needs to be up!
> And what happens if the dbases crash/become corrupted (say, after a
> power-outage), and PostgreSQL won't start up any more? In MySQL, this was
> easy. In a Perl script I did something like: "FLUSH TABLES WITH READ
> LOCK", and then I proceeded to tar the entire dbases directory (so I could
> untar, without the MySQL server needing to be up).

You can always delete the DB cluster, initialize it, start Postgres and 
then restore it from the dump.

See also:

   http://www.postgresql.org/docs/8.3/static/backup.html

for other possibilities of backing up including file system backup.



Regards,
Ognjen

In response to

Responses

pgsql-novice by date

Next:From: MarkDate: 2009-05-15 10:33:53
Subject: Re: 'Hot' backup of PostgreSQL dbases
Previous:From: A. KretschmerDate: 2009-05-15 09:31:49
Subject: Re: Transform table data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group