Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
minLevel2
outlinetrue
stylenone

...

Database Utilities

This command can be used at any time to test for Database connectivitymanage or upgrade the Database. It will also assist in troubleshooting PostgreSQL and Oracle connection issues with the database.

(short and long forms): There are no arguments used at this time.

Command used:

[dspace]/bin/dspace test- database

Java class:

org.dspace.storage.rdbms.DatabaseManager DatabaseUtils

Valid Arguments

Description

:

Description

testTest the database connection settings (in [dspace]/config/dspace.cfg) are OK and working properly
info

Provide detailed information about the DSpace database itself. This includes the database type, version, driver, schema, and any successful/failed/pending database migrations.

This command, along with "test", is very useful in debugging issues with your database.

migrate

Migrate the database to the latest version (if not already on the latest version). This uses FlywayDB along with embedded migrations scripts to automatically update your database to the latest version.

Optionally, you can run "migrate ignored" to also include any database migrations which are flagged as "Ignored" by the "info" command.

repair

Attempt to "repair" any migrations which are flagged as "Failed" by the "info" command. This uses the FlywayDB repair command.

Please note however, this will NOT automatically repair corrupt or broken data in your database. It merely tries to re-run previously "Failed" migrations.

clean

Completely and permanently delete all tables and data in this database. WARNING: There is no turning back! If you run this command, you will lose your entire database and all its contents.

This command is only useful for testing or for reverting your database to a "fresh install" state (e.g. running "dspace database clean" followed by "dspace database migrate" will return your database to a fresh install state)

- or --