autorestic
autorestic copied to clipboard
feat: add the ability to backup docker volumes from docker container
Background
When building my autorestic
backup I wanted to avoid installing autorestic
locally - this is because I want to avoid manual setups in case I move to a new host.
Problem
I wanted to backup my docker volumes from inside the autorestic
docker container.
It was not possible with the stock image due to lack of the docker-cli
package.
Changes
- Added
docker-cli
package.
Example:
# docker-compose.yml
# docker compose run backup
version: "2.1"
services:
backup:
image: cupcakearmy/autorestic
volumes:
# Docker socket to backup volumes
- /var/run/docker.sock:/var/run/docker.sock
# AutoRestic config
- ./.autorestic.yaml:/.autorestic.yaml
# Run backup
entrypoint: ["autorestic", "backup", "--ci", "-va", "-c", "/.autorestic.yaml"]
version: 2
global:
# ...
locations:
docker_volumes:
from:
- volume_example
type: volume
to: remote
backends:
remote:
# ...
Related Issues:
- Resolves #334
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
autorestic | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 15, 2024 1:26pm |
I can add an example to the docs if you are planning to merge this :)
Thanks, and sorry for being stale for so long. Docs are always welcomed :) I'll merge it.