Skip to content

Commit

Permalink
Update Backup info in README.md (#171)
Browse files Browse the repository at this point in the history
* Update Backup info in README.md
  • Loading branch information
Friddrick authored Jan 12, 2025
1 parent 2a901d8 commit 3019026
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down

0 comments on commit 3019026

Please sign in to comment.