Restore single databaseR

Started by PAWAN SHARMAabout 9 years ago4 messagesgeneral
Jump to latest
#1PAWAN SHARMA
er.pawanshr0963@gmail.com

Hello All,

I am using postgres 9.5 enterprise edition and postgres 9.5 open source
where i want know solution of two problems.

1.How can we restore single database from base backup files only, I don't
have pg_dump backup.
2.How can we restore single instance on different server where multiple
instances are running on the production server.

-Pawan

#2Vick Khera
vivek@khera.org
In reply to: PAWAN SHARMA (#1)
Re: Restore single databaseR

On Wed, Jan 18, 2017 at 7:32 AM, PAWAN SHARMA <er.pawanshr0963@gmail.com>
wrote:

Hello All,

I am using postgres 9.5 enterprise edition and postgres 9.5 open source
where i want know solution of two problems.

1.How can we restore single database from base backup files only, I don't
have pg_dump backup.

Restore the whole thing into a temporary instance of postgres and then
pg_dump the database you want.

2.How can we restore single instance on different server where multiple
instances are running on the production server.

Once you have the dump from pg_dump, you can restore it wherever you like.

Chances are higher for success if the version numbers match or the
destination is newer than the source.

#3PAWAN SHARMA
er.pawanshr0963@gmail.com
In reply to: Vick Khera (#2)
Re: Restore single databaseR

Thanks for reply, but I have 120 databases running on a one single
instance. So it's not possible to take backup of instance instead of taking
pg_dumb of all databases separately.

Example: suppose we have two instances running on single server, instance A
having 120 databases and instance B having 50 databases and I want to move
all databases running on instance A to another server having same postgres
version and server configuration.

So,please suggest how i can move instance A to another server.

On 18 Jan 2017 7:10 p.m., "Vick Khera" <vivek@khera.org> wrote:

Show quoted text

On Wed, Jan 18, 2017 at 7:32 AM, PAWAN SHARMA <er.pawanshr0963@gmail.com>
wrote:

Hello All,

I am using postgres 9.5 enterprise edition and postgres 9.5 open source
where i want know solution of two problems.

1.How can we restore single database from base backup files only, I
don't have pg_dump backup.

Restore the whole thing into a temporary instance of postgres and then
pg_dump the database you want.

2.How can we restore single instance on different server where multiple
instances are running on the production server.

Once you have the dump from pg_dump, you can restore it wherever you

like. Chances are higher for success if the version numbers match or the
destination is newer than the source.

#4Moreno Andreo
moreno.andreo@evolu-s.it
In reply to: PAWAN SHARMA (#3)
Re: Restore single databaseR

Hi,
please don't top post.

Il 18/01/2017 15:01, PAWAN SHARMA ha scritto:

Thanks for reply, but I have 120 databases running on a one single
instance. So it's not possible to take backup of instance instead of
taking pg_dumb of all databases separately.

Example: suppose we have two instances running on single server,
instance A having 120 databases and instance B having 50 databases and
I want to move all databases running on instance A to another server
having same postgres version and server configuration.

So,please suggest how i can move instance A to another server.

Each instance has its own data directory, you need to find and copy the
one that is right for you and start the server. After that you'll see
all of your 120 databases, but you'll be able to dump just the one you need.

HTH,
Moreno

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general