Re: [ADMIN] Import & Export DB table structure with data

Поиск
Список
Период
Сортировка
От Luan Huynh
Тема Re: [ADMIN] Import & Export DB table structure with data
Дата
Msg-id CAAP3KKE7r=o_zTMcWiaFd9UeOG-QT9yp53Z573ub-f949-uORA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ADMIN] Import & Export DB table structure with data  (Ashwani Kumar B <ashwani.b.kumar@ericsson.com>)
Список pgsql-admin
Please take a look at: pg_dump , pg_restore 

For example:

pg_dump  -h localhost -p 5432 -U postgres  --format custom --no-password  --encoding UTF8  --no-security-labels --no-tablespaces  --verbose --table=public.sstb_account --file sstb_account.backup --schema public postgres 

pg_restore  -h localhost -p 5432 -U postgres --dbname=new_database --role=postgres  --format custom --no-tablespaces --schema=public --verbose sstb_account.backup

On Wed, Jul 19, 2017 at 2:18 PM, Ashwani Kumar B <ashwani.b.kumar@ericsson.com> wrote:
Hi vinny

Please give me syntax for PG_Dump

Regards
Ashwani

-----Original Message-----
From: vinny [mailto:vinny@xs4all.nl]
Sent: Wednesday, July 19, 2017 12:47 PM
To: Ashwani Kumar B
Cc: pgsql-performance-owner@postgresql.org; pgsql-sql-owner@postgresql.org; pgsql-admin@postgresql.org; pgsql-admin-owner@postgresql.org
Subject: Re: [ADMIN] Import & Export DB table structure with data

On 2017-07-19 07:55, Ashwani Kumar B wrote:
> Hi
>
> I have to import table structure from one DB  and create the same
> table structure in another DB.
>
> Secondly I have to copy all the data from one DB to another DB
>
> Kindly suggest way forward.
>
> Regards
>
> Ashwani

If both databases are PostgreSQL then you can just use pg_dump.

If the databases are of different brands then you may need special tool, there are many conversion tools available, but not all free or inexpensive.


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

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

Предыдущее
От: Ashwani Kumar B
Дата:
Сообщение: Re: [ADMIN] Import & Export DB table structure with data
Следующее
От: Rikardo Tinauer
Дата:
Сообщение: [ADMIN] Recovery of corrupted database