Search Postgresql Archives

Re: restoring a single database from a pg_dumpall dump file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Apitz <guru@xxxxxxxxxxx> writes:
> We're using pg_dumpall (from 14.1) to dump older clusters and
> restore them into a new 14.1 cluster. The dump contains some databases
> together with roles etc.

> Is there some easy way to restore only one database out of this dump
> file?

No; pg_dumpall's output is just a flat SQL script.

You might consider using "pg_dumpall -g" to get just the roles
(and tablespaces if any), and then dumping desired databases
individually with pg_dump.

If all you have is a previously-made dumpall script, you'd
have to slice it up with an editor.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux