Reputation: 113
I am using PostgreSQL as a database for DSpace project. I am inserted some records in tables now i want a script with the help of which the database become empty only it contains the data in that table which is automatically inserted during fresh install.
Upvotes: 2
Views: 978
Reputation: 2444
Just execute the following commands in your SSH terminal:
[dspace]/bin/dspace database clean
[dspace]/bin/dspace database migrate
[dspace] is installation path of Dspace (e.g. /root/Dspace/installed/5.3) which is defined in the configuration file: dspace.cfg If you want to return your database to a fresh install state, just run the following command instead of the second one above:
[dspace]/bin/dspace database migrate ignored
Upvotes: 0
Reputation: 2189
[dspace]/bin/dspace database clean
[dspace]/bin/dspace database migrate
Swap in your actual DSpace install directory for [dspace].
According to the official DSpace documentation:
running "dspace database clean" followed by "dspace database migrate" will return your database to a fresh install state
Upvotes: 1