Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThT3G-00047F-7E for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Dec 2012 22:39:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1ThT3F-00034S-A2 for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Dec 2012 22:39:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThT3E-00034M-Ec for pgsql-bugs@postgresql.org; Sat, 08 Dec 2012 22:39:16 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1ThT3B-0007Mt-Kb for pgsql-bugs@postgresql.org; Sat, 08 Dec 2012 22:39:15 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id qB8Md8902311 for ; Sat, 8 Dec 2012 14:39:08 -0800 Message-ID: <50C3C188.6050701@hogranch.com> Date: Sat, 08 Dec 2012 14:39:04 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: pg_restore References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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