From: Stuart L. <sl...@cc...> - 2007-11-30 01:34:14
|
On 木, 2007-11-29 at 13:52 -0600, Stan Williams wrote: > Hi. > > I'm using Sql-Ledger 2.8.8 and Postgres 8.1.9. Every night I do a > database dump using the following command: > > pg_dump dataset –U username | gzip > filename.gz > > Today I dropped my database then recreated it in Sql-Ledger Administration. > > When I try to resore the database using to following: > > psql dataset –U username < input file name I believe that if you're using pg_dump for the backup, you should use pg_restore to restore it. I'm doing something like this: pg_dump -F t databasename > backupfile for the backup, and this: pg_restore -c -U sql-ledger -d databasename -F t backupfile I have found that you need the -c in there to wipe out the old database so you don't get those annoying ``already exists'' messages. -- Stuart Luppescu -=- s-luppescu .at. uchicago.edu University of Chicago (^_^)/ CCSR 才文と智奈美の父 -=-=- Kernel 2.6.20-gentoo-r It takes a special kind of courage to face what we all have to face. |