From: | Reece Hart <reece(at)harts(dot)net> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | pg_restore and database comments |
Date: | 2007-03-08 00:52:59 |
Message-ID: | 1173315179.16912.35.camel@snafu.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I periodically take snapshots of my current development database to
facilitate recovery from screw-ups. I do so roughly like this:
createdb -EUTF-8 db-snapshot
pg_dump -Fc db | pg_restore -d db-snapshot
For which I get the fairly innocuous error:
pg_restore: WARNING: database comments may only be applied to
the current database
I'm not aware of any other part of a database dump that references the
source database by name (nor should it, since this would cause problems
when restoring to a different database name).
Is there a better way to snaphsot a database? createdb -T db db-snapshot
seemed like a good idea, but that requires the template db to not be in
use (ie, no logged in users).
I'm running 8.1.8 and will move to 8.2.3 shortly.
Thanks,
Reece
--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0
./universe -G 6.672e-11 -e 1.602e-19 -protonmass 1.673e-27 -uspres bush
kernel warning: universe consuming too many resources. Killing.
universe killed due to catastrophic leadership. Try -uspres carter.
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-03-08 01:09:26 | Re: [HACKERS] WITH/RECURSIVE plans |
Previous Message | snacktime | 2007-03-08 00:49:25 | server vendor recommendation |