PostgreSQL backups

Derek Neighbors derek at gnue.org
Thu Dec 1 21:59:29 MST 2005


Bart Garst wrote:

>I'll try asking here...
>
>We have a lot of data in our database. We obviously need to back it up.
>Doing a complete dump every day is not going to work for us.
>
>We'd like to do a complete dump today (for example), then only dump the new
>data tomorrow, etc...
>
>What I'd like to know is:
>Is there some "feature" in postgresql that will allow us to do this?
>Is there an open source utility that will do this?
>
>Any suggestions will be appreciated.
>
>  
>
There are a few tricks.  One is that you can compress the dump.

pg_dump dbname |gzip > filename.gz  for example. 

I believe newer versions (7.x) have the compression built in.

pg_dump -Fc dbname > filename

This is nice because you can restore specific tables without having to 
unzip the entire file.

See the man pages for pg_dump, pg_dumpall for specifics.

A several hundred megabyte database should backup in full in under 10 
minutes.

If you are running 8.x (maybe even earlier 7x) you can do it.

http://www.postgresql.org/docs/8.1/interactive/backup-online.html

--Derek Neighbors
Integrum Technologies
http://www.integrumtech.com
"Redefining IT"





More information about the PLUG-discuss mailing list