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/markdown/location/docker.md

44 lines
614 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
version: '3.7'
volumes:
data:
name: my-data
services:
api:
image: alpine
volumes:
- data:/foo/bar
```
```yaml | .autorestic.yml
locations:
4 years ago
- name: hello
from: volume:my-data
5 years ago
to:
- remote
backends:
4 years ago
- name: remote
# ...
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.
5 years ago
> :ToCPrevNext