Re: Pg backup

Поиск
Список
Период
Сортировка
От Nikhil Ingale
Тема Re: Pg backup
Дата
Msg-id CALXkTpzF1YgdxFaA7=gP6XbEYAa5XO+2gSfv_P2XFPtb+=hRSg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pg backup  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
Thanks, I'll check it out. 

On Wed, Oct 12, 2022 at 7:06 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Wed, 2022-10-12 at 16:29 +0530, Nikhil Ingale wrote:
> How do I take the backup of all the tables (no table data, no functions and other objects) only from one schema and restore to another schema?

Perform a dump with

 pg_dump --schema=yourschema --schema-only dbname

Create a new database, restore the dump into the new database, rename the schema there,
dump the new database and drop it, then import the new dump into the original database.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

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

Предыдущее
От: Yogesh Mahajan
Дата:
Сообщение: Re: pgAdmin hangs while there is a long running process marked red
Следующее
От: Ebin Jozer
Дата:
Сообщение: Re: Postgresql community edition upgrade