[EMAIL PROTECTED] writes:
> pg_restore -U admin -c /home/postgres/staging-dump

> Now, although tons of data is now streaming to my monitor, when it is 
> done, none of the new data is in the backup's staging db.

The default behavior of pg_restore is to emit SQL commands onto stdout,
which of course is not going to do a lot for your backup DB.  What you
probably want is to include a "-d database" switch to tell it to connect
to a database and send the commands there.

> So, I tried doing this variation:

> pg_restore -U admin -C -d staging /home/postgres/staging-dump
> pg_restore: [archiver (db)] could not execute query: ERROR:  database 
> "staging" already exists

-C tells it to create (and then connect to) the target DB, rather than
connect to an existing DB and restore into that.  So generally you want
to say "-d template1" (or some other existing DB) when you use -C.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to