mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 02:20:39 +00:00
37
docs/pages/location/docker.md
Normal file
37
docs/pages/location/docker.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Docker
|
||||
|
||||
autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.
|
||||
|
||||
```yaml | docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
volumes:
|
||||
data:
|
||||
name: my-data
|
||||
|
||||
services:
|
||||
api:
|
||||
image: alpine
|
||||
volumes:
|
||||
- data:/foo/bar
|
||||
```
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
foo:
|
||||
from: my-data
|
||||
type: volume
|
||||
# ...
|
||||
```
|
||||
|
||||
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.
|
Reference in New Issue
Block a user