Disaster Recovery
This guide describes the backup and recovery concept for a Relution Server that uses a database (PostgreSQL or MariaDB) and optionally integrates an on-premises S3-compatible storage system (such as SeaweedFS, see Object Storage for Relution →).
The goal is to ensure data integrity, minimize downtime (RTO), and guarantee reliable restorability in an emergency.
Components to Back Up
The Relution infrastructure typically consists of the following components that need to be backed up:
- Application Server: Hosts the Relution application and services.
- Database (On-Premises): MariaDB or PostgreSQL.
- S3 Storage (On-Premises): Object-based storage system (optional) for storing files (e.g., app packages and uploaded resources). Without S3, Relution stores this content in the database; the database backup then also covers all files.
Backup Goals
- Minimizing data loss (RPO – Recovery Point Objective)
- Fast restoration of services (RTO – Recovery Time Objective)
- Protection against hardware failure, software errors, and human errors
- Protection against data manipulation and ransomware
1. Database Backup
| Strategy | Details |
|---|---|
| Frequency | Daily full dumps (e.g., via mariadb-dump or pg_dump) |
| Incremental | Hourly incremental backups (depending on necessity) |
| Management | Automated rotation and retention rules |
| Security | Encryption of backup files (AES256 or GPG) depending on necessity |
| Consistency | During the backup, the Relution service should be temporarily stopped to avoid inconsistencies! |
2. S3 Storage Backup (Optional)
| Strategy | Details |
|---|---|
| Method | Replication to a second S3 target or regular syncing (s3cmd sync, rclone sync) |
| Scope | Backup of critical buckets at defined intervals |
| Consistency | During the backup, the Relution service should be temporarily stopped to avoid inconsistencies! |
3. Server Configuration Backup
All relevant configuration files must be backed up:
/opt/relution(Directory of the Relution Server)compose.yaml, ordocker-compose.ymlfor older installations (or comparable startup scripts)application.yml(Relution configuration)- NginX configuration file, if applicable
- SSL certificate and key
- Keys for encrypted data, if configured (see the following note)
relution.database.crypto.keks), or an SSE-C key or key file (keyFile, see Server-Side Encryption (SSE-C) →) is configured for the object storage, the database or bucket backup cannot be restored without these keys. The keys are often not stored in application.yml, but in environment variables, an .env file or a secret store. They are kept separately from the data backups. After a KEK change, the old key is retained for as long as older database backups exist. Without an external KEK, Relution generates the key itself and stores it in the database; in this case the database backup is sufficient.Backup Storage Locations
Adherence to the 3-2-1 backup principle is recommended:
- 3 copies of the data
- 2 different systems/media
- 1 copy external/offsite
Time Schedule
| Interval | Backup |
|---|---|
| Daily | Full database backup |
| Hourly | Incremental DB backup (depending on necessity) |
| Daily | S3 sync of critical buckets |
| Weekly | Full server configuration backup |
Further Aspects
| Area | Details |
|---|---|
| Automation | Cron jobs or systemd timers; Logging all processes; Notifications on errors |
| Encryption | Encryption of all backups; TLS/HTTPS/SSH for transport |
| Integrity Check | Monthly test restore |
1. Database Recovery
- Selection of the correct backup file
- Preparation of the target system (stopping the Relution service; the database service must be running, create an empty database if necessary)
- Data import (e.g., via
psqlormysql) - Functional test of the Relution application
The restore uses the same Relution version that was installed at the time of the backup. Database updates only run forward; an update to a newer version is then performed as usual (see Update →). A configured external KEK must be available again when Relution starts.
2. S3 Storage Recovery
- Selection of the objects/buckets
- Restoration via
rclone,s3cmd, or API - Integrity check (verification that the files are available in Relution)
3. Full System Recovery
- Restoration of configurations (from the server configuration backups).
- Restart of all services.
- Functional test of the complete application.
Monitoring & Alerting
- Monitoring of all backup processes (e.g., with tools like Grafana + Prometheus).
- Alerting for:
- Backup errors
- Low disk space
- Integrity errors
- Test-restore failures
Security
- Access restrictions (Least Privilege principle).
- Secure storage of keys and credentials.
- Regular updates of the software used.
Documentation
- Documentation of all process changes (configuration, schedules).
- Clear responsibilities for backup and restore.
- Log data retention for at least 90 days.
Conclusion
This backup concept ensures that both the database and the on-premises S3 storage system are reliably protected and can be quickly restored in an emergency. Through automation and regular checks, operational security is guaranteed long-term.