Re: Postgres12 - Confusion with pg_restore

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Postgres12 - Confusion with pg_restore
Дата
Msg-id 1134E38C-C188-4950-A050-E2C2D6EED7E2@thebuild.com
обсуждение исходный текст
Ответ на Postgres12 - Confusion with pg_restore  (Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>)
Ответы Re: Postgres12 - Confusion with pg_restore  (Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>)
Список pgsql-general

> On Jun 5, 2020, at 11:20, Laura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch> wrote:
> sudo -u postgres pg_restore -v -C -d foobar 4_foobar_pgdump_Fc

You need to connect to a database that already exists (such as "postgres"); it then creates the database you are
restoringand switches to it.  The relevant manual line is: 

    "When (-C / --create) is used, the database named with -d is used only to issue the initial DROP DATABASE and
CREATEDATABASE commands. All data is restored into the database name that appears in the archive." 

--
-- Christophe Pettus
   xof@thebuild.com




В списке pgsql-general по дате отправления:

Предыдущее
От: Laura Smith
Дата:
Сообщение: Postgres12 - Confusion with pg_restore
Следующее
От: Laura Smith
Дата:
Сообщение: Re: Postgres12 - Confusion with pg_restore