Re: pg_restore

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: pg_restore
Дата
Msg-id 50C3C188.6050701@hogranch.com
обсуждение исходный текст
Ответ на pg_restore  (Branka Stancic <brankastancic@hotmail.com>)
Список pgsql-bugs
On 12/5/2012 4:40 AM, Branka Stancic wrote:
> I have problem.
> I want to restore only data in database.
> In pgAdmin I was backup only data from old database and now i have
>  backup file backup.sql.
> In terminale I want restore only data in new database and I using
> command pg_restore -i -h localhost -p 5432 -U postgres -d payroll
> --data-only -v "/home/postgres/backup.sql",
> but i get an error:
> pg_restore:[archiver] input file appears to be a text format
> dump.Please use psql

pg_restore is only for binary dumps such as are generated by pg_dump -Fc

plain text dumps are restored with psql -f filename.sql

if you dumped just the data, then thats all it will restore (data only
mean it won't create the tables and such),   but you probably should
truncate the existing tables first if there's old data in them.

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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Installing PG 7.3.4 on Linux 6
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7741: Two bugs when backing up databases with default privileges defined on public schema