From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: pg_restore
Date: Sat, 08 Dec 2012 14:39:04 -0800
Message-ID: <50C3C188.6050701@hogranch.com> (raw)
In-Reply-To: <BAY174-W14C6C62FF410A27CD3561DBB460@phx.gbl>
References: <BAY174-W14C6C62FF410A27CD3561DBB460@phx.gbl>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: pg_restore
In-Reply-To: <50C3C188.6050701@hogranch.com>
References: <BAY174-W14C6C62FF410A27CD3561DBB460@phx.gbl> <50C3C188.6050701@hogranch.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