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@xxxxxx Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general