From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Chris Henderson <henders254(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Restoring a database |
Date: | 2008-10-15 21:28:24 |
Message-ID: | 48F66078.1040308@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 15/10/2008 22:19, Chris Henderson wrote:
> I backup all my databases by using pg_dumpall - pg_dumpall >
> /tmp/postgres.backup.`hostname`. It should backup four DBs: analyze,
> postgres, template0 and template1
> I guess this backs up the schemas as well.
>
> Now I want to restore one of the databases and schema from this backup
> dump file onto a different server. The databases is call "analyze".
> Does anyone know how to do that with pg_restore? Thanks.
Off the top of my head, I don't think you can do this with pg_restore.
pg_dumpall produces a plain-text dump, which means that you need to use
it as input to psql to restore from it; pg_restore uses the non-text
formats.
However, if the only other databases in the dump are the built-in ones,
they will add very little time to the restore process.
In any case, there's no need to back up databases postgres, template0
and template1, unless you've added custom stuff to template1 that you
need to keep.
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Frost | 2008-10-15 21:29:58 | Re: Restoring a database |
Previous Message | Jeff Frost | 2008-10-15 21:26:49 | Re: Restoring a database |