Docker image based on the awesome cupcakearmy/autorestic.
Often it is usefully to trigger backups automatically. So in this image, it would be trigger the command every 5min.
- Create an initial config file (
autorestic.yml
) such as:
locations:
my-location:
from: /data
to: my-backend
forget: prune
cron: '0 3 * * 0' # Every Sunday at 3:00
You can read full docs to configure it.
-
Create an empty file (
autorestic.lock.yml
) -
run docker-compose as below:
version: "3"
services:
autorestic:
image: guixi/autorestic
container_name: autorestic
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- $(pwd)/autorestic.yml:/root/.autorestic.yml:ro
- $(pwd)/autorestic.lock.yml:/root/.autorestic.lock.yml
- ~/.config/rclone/rclone.conf:/root/.config/rclone/rclone.conf:ro #optional
- my-volume:/data
you can use autorestic to show all buckups such as
docker exec -it autorestic autorestic exec -av -- snapshots
and also use restic directly such as
docker exec -it autorestic restic
MIT © Uglyboy