From: John Scalia <jayknowsunix@gmail.com>
To: pgsql-admin@postgresql.org
Subject: pg_restore and the -C flag
Date: Wed, 17 Jul 2019 08:43:43 -0400
Message-ID: <4C9267A4-5A07-4FC0-B331-40EA95959534@gmail.com> (raw)
Hi all,
From what I’m reading on www.postgresql.org, the -C option for pg_restore is supposed to create the database before restoring into it, but here’s my command line:
pg_restore -p 5432 -C -d restored_db recovery.dmp
The dmp file was created with pg_dump using
pg_dump -p 5432 -F c orig_db > recovery.dmp.
Pg_restore errors saying the database does not exist. Yes, I know that port 5432 is the default, but not all of our databases are. So, do I have any options wrong with either utility? Or why is this happening? I’m just trying to document a recovery procedure and testing my documentation.
—
Jay
Sent from my iPhone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com
Subject: Re: pg_restore and the -C flag
In-Reply-To: <4C9267A4-5A07-4FC0-B331-40EA95959534@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox