Update Backup info in README.md (#171)

* Update Backup info in README.md
pull/212/head
Friddrick 2025-01-12 13:44:01 +02:00 committed by GitHub
parent 2a901d8ee7
commit 3019026a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 39 additions and 0 deletions

View File

@ -149,6 +149,45 @@ Custom root CA certificates can be mounted under `/usr/local/share/ca-certificat
- "./rootca.pem:/usr/local/share/ca-certificates/rootca.crt"
```
## Database Management
It is possible to backup and restore the underlying database using volume archiving.
The process is *NOT* battle-tested, so it is *NOT* to be followed uncritically.
### Backup
1. Stop the MISP containers:
```bash
docker compose down
```
2. Create an archive of the `misp-docker_mysql_data` volume using `tar`:
```bash
tar -cvzf /root/misp_mysql_backup.tar.gz /var/lib/docker/volumes/misp-docker_mysql_data/
```
3. Start the MISP containers:
```bash
docker compose up
```
### Restore
1. Stop the MISP containers:
```bash
docker compose down
```
2. Unpack the backup and overwrite existing data by using the `--overwrite` option to replace existing files:
```bash
tar -xvzf /path_to_backup/misp_mysql_backup.tar.gz -C /var/lib/docker/volumes/misp-docker_mysql_data/ --overwrite
```
3. Start the MISP containers:
```bash
docker compose up
```
## Troubleshooting
- Make sure you run a fairly recent version of Docker and Docker Compose (if in doubt, update following the steps outlined in https://docs.docker.com/engine/install/ubuntu/)