Search Postgresql Archives

pg_restore and database comments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux