mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 16:26:25 +00:00
1.4 KiB
1.4 KiB
Docker
autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.
Available since version 0.13
Let see an example.
version: '3.7'
volumes:
data:
name: my-data
services:
api:
image: alpine
volumes:
- data:/foo/bar
locations:
hello:
from: 'volume:my-data'
to:
- remote
options:
forget:
keep-last: 14 # Useful for limitations explained belowd
backends:
remote: ...
Now you can backup and restore as always.
autorestic -l hello backup
autorestic -l hello restore
If the volume does not exist on restore, autorestic will create it for you and then fill it with the data.
Limitations
Unfortunately there are some limitations when backing up directly from a docker volume without mounting the volume to the host:
- Incremental updates are not possible right now due to how the current docker mounting works. This means that it will take significantely more space.
- Exclude patterns and files also do not work as restic only sees a compressed tarball as source and not the actual data.
If you are curious or have ideas how to improve this, please read more here. Any help is welcomed 🙂
:ToCPrevNext