Yup, sorry -- should have included that.

Dump was done using:

/usr/local/pgsql/bin/pg_dump \
--verbose \
--oids \
--create \
--format=c \
--username=dspace \
dspace > dumpfile


or more briefly,
/usr/local/pgsql/bin/pg_dump --verbose -o -C -Fc -U dspace dspace > dumpfile

So using the compressed format.

Also, using postgresql 8.0.something


Also, restore instructions say to use

pg_restore -C -d postgres -U dspace dumpfile 

but when I include "-d postgres" I get this error:

pg_restore: [archiver (db)] connection to database "postgres" failed: FATAL:  
database "postgres" does not exist

which is possibly a vital clue. Leaving out the "-d postgres" option, it seems 
to work -- outputs lots of CREATE TABLE messages etc. -- but ... results as 
below.

Am I supposed to create a database named "postgres" after initdb?

As I said -- I'm confused. :-(


Regards,
Steve


Mark Diggory wrote:
> Steve,
>
> can you post the pg_dump command and options you've used?
>
> -Mark
>
> On Jan 23, 2008, at 9:08 PM, Steve Thomas wrote:
>
>   
>> I need help! I'm using pg_dump to make a backup of our database,  
>> and ...
>> sensibly, I think ... wanted to confirm that we could restore from  
>> this
>> dump using pg_restore.
>>
>> (Actually, I've done this once without drama, when migrating from our
>> dev server to our production server.)
>>
>> So, on our dev server, I followed the instructions for pg_restore, but
>> cannot get it to work (and thus now have no dev database!)
>>
>> I've gone right back to square one and reinstalled postgresql. Then:
>>
>> * ran initdb -- no problem
>>
>> * ran
>>
>> createuser -U postgres -d -A -P dspace ; createdb -U dspace -E  
>> UNICODE dspace
>>
>> as per instructions -- no problem.
>>
>> * ran pg_restore to restore data:
>>
>> pg_restore -C  -U dspace 200712061830
>>
>> This seemed to run OK, creating all the tables and adding data,  
>> but ...
>>
>> * if I run
>>
>> $ psql dspace dspace
>>
>> I get
>>
>> dspace=> select * from item;
>> ERROR:  relation "item" does not exist
>>
>> -- ie apparently there's no data.
>>
>>
>> So, can anyone help with where I'm going wrong? Right now I have no  
>> dev server so I'm in deep ...
>>
>>
>> Thanks,
>> Steve
>>
>> -- 
>>
>> Stephen Thomas,
>> Senior Systems Analyst,
>> University of Adelaide Library
>> UNIVERSITY OF ADELAIDE SA 5005 AUSTRALIA
>> Phone: +61 8 830 35190
>> Fax: +61 8 830 34369
>> Email: [EMAIL PROTECTED]
>> URL: http://www.adelaide.edu.au/directory/stephen.thomas
>> CRICOS Provider Number 00123M
>>
>> -----------------------------------------------------------
>> This email message is intended only for the addressee(s) and  
>> contains information that may be confidential and/or copyright. If  
>> you are not the intended recipient please notify the sender by reply  
>> email and immediately delete this email. Use, disclosure or  
>> reproduction of this email by anyone other than the intended  
>> recipient(s) is strictly prohibited. No representation is made that  
>> this email or any attachments are free of viruses. Virus scanning is  
>> recommended and is the responsibility of the recipient.
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> DSpace-tech mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>>     
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>   

-- 

Stephen Thomas,
Senior Systems Analyst,
University of Adelaide Library
UNIVERSITY OF ADELAIDE SA 5005 AUSTRALIA
Phone: +61 8 830 35190
Fax: +61 8 830 34369
Email: [EMAIL PROTECTED]
URL: http://www.adelaide.edu.au/directory/stephen.thomas
CRICOS Provider Number 00123M

-----------------------------------------------------------
This email message is intended only for the addressee(s) and contains 
information that may be confidential and/or copyright. If you are not the 
intended recipient please notify the sender by reply email and immediately 
delete this email. Use, disclosure or reproduction of this email by anyone 
other than the intended recipient(s) is strictly prohibited. No representation 
is made that this email or any attachments are free of viruses. Virus scanning 
is recommended and is the responsibility of the recipient.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to