Error with pgAdmin III backup/restore

From: Sean Ayres <sayresvt(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Error with pgAdmin III backup/restore
Date: 2010-12-28 02:46:16
Message-ID: AANLkTins=MZXWvpFeshO0-i=-HpAeHsvHj9z6xguVL9o@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I've run into an issue with the default backup/restore of a database in
pgAdmin (the one bundled with PostgreSQL 9.02). I am currently running
Version 1.12.2 (Dec 14 2010, rev: REL-1_12_2) on PostgreSQL 9.02. The issue
has occurred for me on Windows 7 Ultimate (32-bit) and Windows Server 2003
(32-bit R2 Service Pack 2).

The error occurs when I try to backup either one of my PostGIS databases
with the default options selected.
Format: COMPRESS (No Compress Ratio or Encoding specified)
Dump Options #1: Only "Blobs" is checked
Dump Options #2: Only "Verbose messages" is checked
Objects: All objects are selected (Database, schema, and all tables)

My database names contain no quotes or special characters other than a
single underscore (example: Test_Exits, Test_GIS, etc.)

------------------------------------------------------------------------------------------------------------------
The error message I receive when trying to backup is the following:

C:/Applications/PostgreSQL/9.0/bin\pg_dump.exe --host localhost --port 5432
--username "postgres" --format custom --blobs --verbose --file
"C:\Applications\Test.backup" \"Test_Exits\"
pg_dump: [archiver (db)] connection to database ""Test_Exits"" failed:
FATAL: database ""Test_Exits"" does not exist
pg_dump: *** aborted because of error

Process returned exit code 1.
------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------
The error message I receive when trying to restore is the following:

C:/Applications/PostgreSQL/9.0/bin\pg_restore.exe --host localhost --port
5432 --username postgres --dbname \"Test_Exits\" --verbose
"C:\Applications\OpenTMS_Exits.backup"
pg_restore: connecting to database for restore
pg_restore: [archiver (db)] connection to database ""Test_Exits"" failed:
FATAL: database ""Test_Exits"" does not exist
pg_restore: *** aborted because of error

Process returned exit code 1.
------------------------------------------------------------------------------------------------------------------

It seemed obvious to me that the escape characters ( \ ) before the double
quotes caused the issue. Running the commands in the psql shell without the
two backslashes around the database name caused both the backup and restore
to work properly. I'm wondering if this issue was introduced by the change
made for Ticket#266 <http://code.pgadmin.org/trac/ticket/266>?

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Erwin Brandstetter 2010-12-28 17:41:18 Re: Database selector
Previous Message Guillaume Lelarge 2010-12-26 10:53:51 Re: pgAdmin 1.12.0 / Win / no drag&drop in SQL-Editor ???