Page History
...
Code Block |
---|
# clean up the database nightly 40 2 * * * /usr/local/pgsql/bin/vacuumdb --analyze dspace > /dev/null 2>&1 |
The DSpace database can be backed up and restored using usual methods, for example with pg_dump and psql. However when restoring a database, you will need to perform these additional steps:
- The fresh_install target loads up the initial contents of the Dublin Core type and bitstream format registries, as well as two entries in the epersongroup table for the system anonymous and administrator groups. Before you restore a raw backup of your database you will need to remove these, since they will already exist in your backup, possibly having been modified. For example, use:
Code Block DELETE FROM dctyperegistry; DELETE FROM bitstreamformatregistry; DELETE FROM epersongroup;
Wiki Markup After restoring a backup, you will need to reset the primary key generation sequences so that they do not produce already-used primary keys. Do this by executing the SQL in _\[dspace-source\]/dspace/etc/update-sequences.sql_, for example with:
Future updates of DSpace may involve minor changes to the database schema. Specific instructions on how to update the schema whilst keeping live data will be included. The current schema also contains a few currently unused database columns, to be used for extra functionality in future releases. These unused columns have been added in advance to minimize the effort required to upgrade.Code Block psql -U dspace -f [dspace-source]/dspace/etc/update-sequences.sql
...
The database manager is configured with the following properties in dspace.cfg:
db.url | The JDBC URL to use for accessing the database. This should not point to a connection pool, since DSpace already implements a connection pool. |
db.driver | JDBC driver class name. Since presently, DSpace uses PostgreSQL-specific features, this should be org.postgresql.Driver. |
db.username | Username to use when accessing the database. |
db.password | Corresponding password ot use when accessing the database. |
...