It is recommended to have a look at the Architecture page first to familiarize yourself with the RDepot components and their role.

## Database backup

Before doing any version upgrade of RDepot, always create a backup first. In the container or on the host where the database is running, execute the following command (or similar):

pg_dump rdepot > rdepot_backup.sql


where rdepot is the name of the database.

To restore data in the case where an upgrade failed, execute the following command (or similar) in the container or on the host where the database is running:

psql rdepot < rdepot_backup.sql


where rdepot is the name of the database.

## Automated database change management

RDepot uses Liquibase for database change management. It is configured in the application configuration (see Configuration) as follows:

spring:
liquibase:
change-log: classpath:liquibase-changeLog.xml
url: jdbc:postgresql://oa-rdepot-db:5432/rdepot
user: rdepot