PostgreSQL Backup and Restore methods

389 views
Skip to first unread message

Maya Zbitneva

unread,
Mar 26, 2021, 9:03:13 AM3/26/21
to DSpace Technical Support

Good day!

Could you help me please to solve the problem:

I tried to make Backup and Restore procedure

https://wiki.lyrasis.org/display/DSDOC6x/Storage+Layer#StorageLayer-MaintenanceandBackup

using PostgreSQL Backup and Restore methods.

I used two scenarios:

First one:

1) pg_dump dspace > dspace.sql

2) stop tomcat

3) dropdb dspace

4) createdb --username=postgres --owner=dspace --encoding=UNICODE dspace

5) psql -d dspace -f dspace.sql

6) start tomcat

Second one:

1) pg_dump dspace -F c -f dspace.dat

2) stop tomcat

3) dropdb dspace

4)createdb --username=postgres --owner=dspace --encoding=UNICODE dspace

5) pg_restore -d dspace dspace.dat

6) start tomcat.

And I obtained the following result: I restored communities, collections. And I did not restore items in all collections in both scenarios.

Question: What i did wrong?


José Geraldo

unread,
Mar 26, 2021, 10:03:54 AM3/26/21
to Maya Zbitneva, DSpace Technical Support
Don't see the files?

Did you import the assetstore directory? 
  • [dspace]/assetstore

--
All messages to this mailing list should adhere to the Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/a098cd6e-2d12-4e49-8084-07ed5b2cb6ffn%40googlegroups.com.


--
At.te,

José Geraldo

Maya Zbitneva

unread,
Mar 26, 2021, 11:59:35 AM3/26/21
to DSpace Technical Support
Thank you for the answer.
What do you mean under word "import"?
I just copied assetstore before pg_dump and copied it back after pg_restore. Is it right?


пятница, 26 марта 2021 г. в 16:03:54 UTC+2, jos...@gmail.com:

José Geraldo

unread,
Mar 26, 2021, 1:29:10 PM3/26/21
to Maya Zbitneva, DSpace Technical Support
Were you able to view after copying?



--
At.te,

José Geraldo

Maya Zbitneva

unread,
Mar 26, 2021, 1:37:23 PM3/26/21
to DSpace Technical Support
No.

пятница, 26 марта 2021 г. в 19:29:10 UTC+2, jos...@gmail.com:

Taner Korkmaz

unread,
Apr 7, 2021, 4:37:06 PM4/7/21
to DSpace Technical Support
Hi Maya,

createdb -E UNICODE dspace
psql --set ON_ERROR_STOP=on dspace < dump.sql
psql -U postgres -d dspace
ALTER ROLE dspace WITH PASSWORD 'dspace';
ALTER DATABASE dspace OWNER TO dspace;
GRANT ALL PRIVILEGES ON DATABASE dspace TO dspace;
CREATE EXTENSION pgcrypto;
\q
postgresql restart
tomcat restart

REBUILD SYSTEM 
REINDEX SOLR
Reply all
Reply to author
Forward
0 new messages