You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autorestic/docs/pages/location/docker.md

38 lines
550 B

5 years ago
# Docker
5 years ago
autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.
5 years ago
```yaml | docker-compose.yml
3 years ago
version: '3.8'
5 years ago
volumes:
data:
name: my-data
services:
api:
image: alpine
volumes:
- data:/foo/bar
```
```yaml | .autorestic.yml
locations:
hello:
3 years ago
from: my-data
type: volume
4 years ago
# ...
5 years ago
```
Now you can backup and restore as always.
```bash
4 years ago
autorestic backup -l hello
5 years ago
```
```bash
4 years ago
autorestic restore -l hello
5 years ago
```
4 years ago
The volume has to exists whenever backing up or restoring.