Dear Sir,

We had similar problems concerning the database restore.
The difference between us, is that we are using the pg_dumpall command, 
which exports
all the transactions of the database (i.e. with the relations creation, the 
user creations, etc).

Without knowing whether we could be of any help, I provide you with what we 
do in order
to restore our database.

1) With the pg_dumpall tool we create several bzipped2 dump files (i.e. 
database-dump-<date>.bzip2)
2) Choosing the desired bzipped file, we unzip it.
3) As root we execute "psql -U postgres -f <dbfilename>", where the 
dbfilename is the extracted bzipped file.
4) We do an ant update to the dspace installation
5) We restart postgres and Tomcat

After that everything is OK. We have followed this prodecure to several 
dspace installations we have in our institution
and everything works out fine.

However, I would suggest to try this out to a test db first, because the 
information above is provided as is, with no warranty
of their success.

Hoping that we have helped you

Best Regards,

-Fk

-- 
Filippos Kolovos
Software Systems Analyst & Engineer
M.Sc. (Eng.) in Data Communications

Automation & Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
           [EMAIL PROTECTED]
Profile: http://www.linkedin.com/in/filipposkolovos
-----------------------------------------------------------------------


----- Original Message ----- 
>
> Message: 1
> Date: Thu, 24 Jan 2008 09:31:32 -0500
> From: Mark Diggory <[EMAIL PROTECTED]>
> Subject: Re: [Dspace-tech] Help! Unable to pg_restore, utterly
> confused
> To: Steve Thomas <[EMAIL PROTECTED]>
> Cc: Dspace-Tech <dspace-tech@lists.sourceforge.net>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> On Jan 23, 2008, at 11:53 PM, Steve Thomas wrote:
>
>> 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
>
>
> You might try dumping to a file explicitly ( -f dumpfile )
>
>>
>> pg_restore -C -d postgres -U dspace dumpfile
>>
>> but when I include "-d postgres" I get this error:
>
> I think you want to connect to the dspace database ( -d dspace )
>
>>
>>
>> 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?
>
> No
>
>>>>
>>>> createuser -U postgres -d -A -P dspace ; createdb -U dspace -E
>>>> UNICODE dspace
>
> I usually use UTF8, I'm not sure if UNICODE is valid or not.
>>>>
>
> -Mark
>
>
>
> ~~~~~~~~~~~~~
> Mark R. Diggory - DSpace Systems Manager
> MIT Libraries, Systems and Technology Services
> Massachusetts Institute of Technology
> 


-------------------------------------------------------------------------
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
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to