Re: Q: extract database name from directory dump - Mailing list pgsql-general

From Melvin Davidson
Subject Re: Q: extract database name from directory dump
Date
Msg-id CANu8FizFs954oSf1xUdTu_94EwBreXH7esUkJDFY=5eHx_cRcQ@mail.gmail.com
Whole thread Raw
In response to Re: Q: extract database name from directory dump  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Responses Re: Q: extract database name from directory dump
List pgsql-general
hmmm, let's see. You haven't specified PostgreSQL version or O/S as is common sense and courtesy, so I will choose one for you.

You are using PostgreSQL version 8.4 on Ubuntu 14.04
Since pg_dump requires an output file, and the database you are dumping must be known, just just the db name in the path.
eg: pg_dump unknown_db > /dumpdir/unknown_db/whatever_filename_you_want.dmp

Then you can get the db name by lookiing at the directory you dumped to! At least that is what most dba's would do.

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Q: extract database name from directory dump
Next
From: Karsten Hilbert
Date:
Subject: Re: Q: extract database name from directory dump