Re: Backup strategies

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Ivan Voras <ivoras(at)freebsd(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Backup strategies
Date: 2008-10-15 10:13:51
Message-ID: 48F5C25F.3050108@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Ivan Voras wrote:

> Warning: DO NOT do on-the-fly binary backups without snapshots.
> Archiving the database directory with tar on a regular file system,
> while the server is running, will result in an archive that most likely
> won't work when restored.

You can do non-snapshot-based filesystem level backups with
pg_start_backup() and pg_stop_backup() as part of a PITR setup. See:

http://www.postgresql.org/docs/8.3/static/continuous-archiving.html

That's the setup I use, with a full backup taken weekly and WAL files
archived from then until the next full backup. There is always at least
one full backup at any time in case a backup fails, and I can roll back
in time for a minimum of a week if anything goes wrong.

I also include plain SQL dumps from pg_dump in the nightly disaster
recovery backups.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2008-10-15 10:23:37 Optimizing queries with projected columns
Previous Message Jesper Krogh 2008-10-15 09:46:36 Re: Backup strategies

Browse pgsql-performance by date

  From Date Subject
Next Message Ivan Voras 2008-10-15 10:31:08 Re: Backup strategies
Previous Message Jesper Krogh 2008-10-15 09:46:36 Re: Backup strategies