pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedExecute pg_dump using psql
3+ messages / 2 participants
[nested] [flat]
* Execute pg_dump using psql
@ 2004-08-12 19:25 Richard Harris <Richard_Harris@adp.com>
0 siblings, 0 replies; 3+ messages in thread
From: Richard Harris @ 2004-08-12 19:25 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm trying to use the psql application to execute pg_dump to backup a
database named test_db. When I run psql interactively, as user dba
connected to database test_db, and enter the command
\! pg_dump -U dba -f /backup/adp_test_db.bak -F c test_db
The command executes with no error and the database gets backed up.
However, when I put the command in the file /backup/backup.cmd and pass
the file to psql as
psql -f /backup/backup.cmd test_db dba
The command fails with the message " does not exist database
"test_dbdatabase "test_db.
Please tell me what I am doing wrong.
Thanks,
Rich Harris
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Execute pg_dump using psql
@ 2004-08-13 18:57 Richard Harris <Richard_Harris@adp.com>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Harris @ 2004-08-13 18:57 UTC (permalink / raw)
To: pgsql-admin
Hi,
I found my problem. When I put the 'pg_dump' command in a file, I used a
'Windows' editor instead of a 'Unix' editor. This appears to have caused
the problem. When I converted to file from 'DOS' to 'Unix' format, psql
executed the command in the file with no error. Sorry for the false
alarm.
Thanks,
Rich
-----Original Message-----
From: Richard Harris
Sent: Thursday, August 12, 2004 12:25 PM
To: 'pgsql-admin@postgresql.org'
Subject: Execute pg_dump using psql
Hi,
I'm trying to use the psql application to execute pg_dump to backup a
database named test_db. When I run psql interactively, as user dba
connected to database test_db, and enter the command
\! pg_dump -U dba -f /backup/adp_test_db.bak -F c test_db
The command executes with no error and the database gets backed up.
However, when I put the command in the file /backup/backup.cmd and pass
the file to psql as
psql -f /backup/backup.cmd test_db dba
The command fails with the message " does not exist database
"test_dbdatabase "test_db.
Please tell me what I am doing wrong.
Thanks,
Rich Harris
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Execute pg_dump using psql
@ 2004-08-14 03:06 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Richard Harris <Richard_Harris@adp.com>
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Momjian @ 2004-08-14 03:06 UTC (permalink / raw)
To: Richard Harris <Richard_Harris@adp.com>; +Cc: pgsql-admin
We think we have found the cause and it will be fixed in 8.0 beta2.
I assume you are testing 8.0beta1?
---------------------------------------------------------------------------
Richard Harris wrote:
> Hi,
>
> I found my problem. When I put the 'pg_dump' command in a file, I used a
> 'Windows' editor instead of a 'Unix' editor. This appears to have caused
> the problem. When I converted to file from 'DOS' to 'Unix' format, psql
> executed the command in the file with no error. Sorry for the false
> alarm.
>
> Thanks,
> Rich
>
> -----Original Message-----
> From: Richard Harris
> Sent: Thursday, August 12, 2004 12:25 PM
> To: 'pgsql-admin@postgresql.org'
> Subject: Execute pg_dump using psql
>
> Hi,
>
> I'm trying to use the psql application to execute pg_dump to backup a
> database named test_db. When I run psql interactively, as user dba
> connected to database test_db, and enter the command
>
> \! pg_dump -U dba -f /backup/adp_test_db.bak -F c test_db
>
> The command executes with no error and the database gets backed up.
> However, when I put the command in the file /backup/backup.cmd and pass
> the file to psql as
>
> psql -f /backup/backup.cmd test_db dba
>
> The command fails with the message " does not exist database
> "test_dbdatabase "test_db.
>
> Please tell me what I am doing wrong.
>
> Thanks,
> Rich Harris
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-08-14 03:06 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 19:25 Execute pg_dump using psql Richard Harris <Richard_Harris@adp.com>
2004-08-13 18:57 Re: Execute pg_dump using psql Richard Harris <Richard_Harris@adp.com>
2004-08-14 03:06 ` Bruce Momjian <pgman@candle.pha.pa.us>
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