Sign inSign up

pascaliske/autorestic

By pascaliske

•Updated 7 months ago

Docker image based on the awesome https://github.com/cupcakearmy/autorestic.

Image
1

3.0K

pascaliske/autorestic repository overview

⁠pascaliske/docker-autorestic

Docker image based on the awesome cupcakearmy/autorestic⁠.

Docker Image Version (tag latest semver) Docker Image Size (tag) Docker Pulls GitHub Tag Build Status License: MIT GitHub Last Commit Awesome Badges

⁠Usage

Create an initial config file (config.yml):

backends:
  my-backend:
    type: local
    path: /var/lib/autorestic/backends/my-backend
locations:
  my-location:
    from: /var/lib/autorestic/locations/my-location
    to:
      - my-backend
  my-volume:
    from: /var/lib/autorestic/locations/my-volume
    to:
      - my-backend

The following bind mounts are required:

MountDescription
/etc/autorestic/config.ymlYour autorestic configuration file.Required
/var/lib/autorestic/locationsAll locations defined as from in the config file.Required
/var/lib/autorestic/backendsAll paths defined for backends with type: local in the config file.Required

Note: To backup volumes you can directly mount them in /var/lib/autorestic/locations and reference them as normal folder in the config file:

docker run --rm \
  -v my-volume:/var/lib/autorestic/locations/my-volume \
  pascaliske/autorestic:latest backup --location my-volume

Run a backup with the required volume mounts:

$ docker run --rm \
    -v $(pwd)/config.yml:/etc/autorestic/config.yml \
    -v $(pwd)/my-backend:/var/lib/autorestic/backends/my-backend \
    -v $(pwd)/my-location:/var/lib/autorestic/locations/my-location \
    -v my-volume:/var/lib/autorestic/locations/my-volume \
    pascaliske/autorestic:latest backup --location my-location

Restore a backup with the required volume mounts. The target folder should be bind mounted as well:

$ docker run --rm \
    -v $(pwd)/config.yml:/etc/autorestic/config.yml \
    -v $(pwd)/my-backend:/var/lib/autorestic/backends/my-backend \
    -v $(pwd)/my-location:/var/lib/autorestic/locations/my-location \
    -v my-volume:/var/lib/autorestic/locations/my-volume \
    -v $(pwd)/my-restore:/tmp/my-restore \
    pascaliske/autorestic:latest restore --location my-location --from my-backend --to /tmp/my-restore

For a list of all commands and their usage visit the autorestic docs⁠. An example usage can be found here⁠.

⁠License

MIT⁠ – © 2021 Pascal Iske⁠

Tag summary

Content type

Image

Digest

Size

14.9 MB

Last updated

over 4 years ago

docker pull pascaliske/autorestic