mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-11-05 21:24:11 +01:00
44 lines
614 B
Markdown
44 lines
614 B
Markdown
# Docker
|
|
|
|
autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.
|
|
|
|
```yaml | docker-compose.yml
|
|
version: '3.7'
|
|
|
|
volumes:
|
|
data:
|
|
name: my-data
|
|
|
|
services:
|
|
api:
|
|
image: alpine
|
|
volumes:
|
|
- data:/foo/bar
|
|
```
|
|
|
|
```yaml | .autorestic.yml
|
|
locations:
|
|
- name: hello
|
|
from: volume:my-data
|
|
to:
|
|
- remote
|
|
|
|
backends:
|
|
- name: remote
|
|
# ...
|
|
```
|
|
|
|
Now you can backup and restore as always.
|
|
|
|
```bash
|
|
autorestic backup -l hello
|
|
```
|
|
|
|
```bash
|
|
autorestic restore -l hello
|
|
```
|
|
|
|
The volume has to exists whenever backing up or restoring.
|
|
|
|
> :ToCPrevNext
|