From: | mengel(at)notes(dot)cc(dot)sunysb(dot)edu |
---|---|
To: | pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org |
Subject: | Re: Fast backup/restore |
Date: | 2006-10-17 14:43:54 |
Message-ID: | OFDF3D1C3A.CACF684A-ON8525720A.0050C01E-8525720A.0050ED06@notes.cc.sunysb.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
We just tar/gzip the entire data directory. It takes all of 20 sec. We've
successfully restored from that also. The machine you are restoring to
*must* be running the save version of postgresql you backed up from.
Matthew Engel
Jeff Davis <pgsql(at)j-davis(dot)com>
Sent by: pgsql-general-owner(at)postgresql(dot)org
10/16/2006 02:35 PM
To
Gandalf <gandalf(dot)me(at)gmail(dot)com>
cc
pgsql-general(at)postgresql(dot)org
Subject
Re: [GENERAL] Fast backup/restore
On Mon, 2006-10-16 at 16:29 +0530, Gandalf wrote:
> I am looking for a *fast* backup/restore tools for Postgres. I've
> found the current used tools pg_dump and pg_restore to be very slow on
> large databases (~30-40GB). Restore takes time in the tune of 6 hrs on
> a Linux, 4 proc, 32 G RAM machine which is not acceptable.
>
> I am using "pg_dump -Fc" to take backup. I understand binary
> compression adds to the time, but there are other databases (like DB2)
> which take much less time on similar data sizes.
>
> Are there faster tools available?
>
http://www.postgresql.org/docs/8.1/static/backup-online.html
With that backup system, you can backup with normal filesystem-level
tools (e.g. tar) while the database is online.
Make sure to backup the remaining active WAL segments. Those are
necessary for the backup to be complete. This step will be done
automatically in 8.2.
If your filesystem has snapshot capability, you have nothing to worry
about. Just snapshot the fs and backup the data directory plus any WAL
segments and tablespaces.
Regards,
Jeff Davis
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | Madison Kelly | 2006-10-17 14:46:15 | Re: A query planner that learns |
Previous Message | DEV | 2006-10-17 14:41:56 | Database users Passwords |