Skip to content

Commit 3019026

Browse files
authored
Update Backup info in README.md (#171)
* Update Backup info in README.md
1 parent 2a901d8 commit 3019026

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,45 @@ Custom root CA certificates can be mounted under `/usr/local/share/ca-certificat
149149
- "./rootca.pem:/usr/local/share/ca-certificates/rootca.crt"
150150
```
151151
152+
## Database Management
153+
154+
It is possible to backup and restore the underlying database using volume archiving.
155+
The process is *NOT* battle-tested, so it is *NOT* to be followed uncritically.
156+
157+
### Backup
158+
159+
1. Stop the MISP containers:
160+
```bash
161+
docker compose down
162+
```
163+
164+
2. Create an archive of the `misp-docker_mysql_data` volume using `tar`:
165+
```bash
166+
tar -cvzf /root/misp_mysql_backup.tar.gz /var/lib/docker/volumes/misp-docker_mysql_data/
167+
```
168+
169+
3. Start the MISP containers:
170+
```bash
171+
docker compose up
172+
```
173+
174+
### Restore
175+
176+
1. Stop the MISP containers:
177+
```bash
178+
docker compose down
179+
```
180+
181+
2. Unpack the backup and overwrite existing data by using the `--overwrite` option to replace existing files:
182+
```bash
183+
tar -xvzf /path_to_backup/misp_mysql_backup.tar.gz -C /var/lib/docker/volumes/misp-docker_mysql_data/ --overwrite
184+
```
185+
186+
3. Start the MISP containers:
187+
```bash
188+
docker compose up
189+
```
190+
152191
## Troubleshooting
153192

154193
- 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/)

0 commit comments

Comments
 (0)