docs: add database backup restore guide

This commit is contained in:
Christian Krakau-Louis
2026-05-22 22:15:53 +02:00
parent be983e7110
commit b5508e428c
9 changed files with 168 additions and 32 deletions
+1 -19
View File
@@ -312,22 +312,4 @@ tail -f /path/to/dmarq/logs/dmarq.log
### Database Backups
For PostgreSQL backups:
```bash
# Create a backup
pg_dump -U dmarq dmarq > dmarq_backup_$(date +%Y%m%d).sql
# Restore from a backup
psql -U dmarq dmarq < dmarq_backup_file.sql
```
For SQLite backups:
```bash
# Create a backup
sqlite3 /path/to/data/dmarq.db .dump > dmarq_backup_$(date +%Y%m%d).sql
# Restore from a backup
cat dmarq_backup_file.sql | sqlite3 /path/to/data/dmarq.db
```
Back up the database before upgrades and on a regular schedule. See [Database Backup and Restore](backups.md) for SQLite and PostgreSQL backup, restore, and verification commands.