instrumentisto / restic-docker-image

restic Docker image (backup utility)

Home Page:https://restic.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

restic Docker Image

Release CI Docker Hub

Docker Hub | GitHub Container Registry | Quay.io

Changelog

Supported tags and respective Dockerfile links

What is restic?

restic is a program that does backups right and was designed with the following principles in mind:

  • Easy: Doing backups should be a frictionless process, otherwise you might be tempted to skip it. Restic should be easy to configure and use, so that, in the event of a data loss, you can just restore it. Likewise, restoring data should not be complicated.
  • Fast: Backing up your data with restic should only be limited by your network or hard disk bandwidth so that you can backup your files every day. Nobody does backups if it takes too much time. Restoring backups should only transfer data that is needed for the files that are to be restored, so that this process is also fast.
  • Verifiable: Much more important than backup is restore, so restic enables you to easily verify that all data can be restored.
  • Secure: Restic uses cryptography to guarantee confidentiality and integrity of your data. The location the backup data is stored is assumed not to be a trusted environment (e.g. a shared space where others like system administrators are able to access your backups). Restic is built to secure your data against such attackers.
  • Efficient: With the growth of data, additional snapshots should only take the storage of the actual increment. Even more, duplicate data should be de-duplicated before it is actually written to the storage back end to save precious backup space.

restic supports the following backends for storing backups natively:

restic.net

restic.readthedocs.io

restic Logo

How to use this image

Mount your data, specify your credentials, and provide the restic command you require:

docker run --rm -v $(pwd):/data \
           -e RESTIC_REPOSITORY=s3:s3.amazonaws.com/bucket_name \
           -e RESTIC_PASSWORD=my-secure-password \
           -e AWS_ACCESS_KEY_ID=my-aws-access-key \
           -e AWS_SECRET_ACCESS_KEY=my-aws-secret-key \
    instrumentisto/restic backup --host myHost /data

NOTE: restic snapshots are tied to the hostname of your devices that are backed up. In case of using Docker, the host name is generate randomly every time you start a new container. Therefore, it's important to use the --host myHost parameter, otherwise the backups take much longer time, because the repository is scanned completely.

With rclone

First, generate rclone config file:

docker run --rm -it -v rclone-config:/config/rclone rclone/rclone config

Then, mount it a volume:

docker run --rm -v $(pwd):/data \
           -v rclone-config:/root/.config/rclone \
           -e RESTIC_REPOSITORY=rclone:rclone-respository-name:folder-path \
           -e RESTIC_PASSWORD=my-secure-password \
       instrumentisto/restic backup --host myHost /data

Image tags

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

<X>

Latest tag of the latest major X restic version.

<X.Y>

Latest tag of the latest minor X.Y restic version.

<X.Y.Z>

Latest tag of the concrete X.Y.Z restic version.

<X.Y.Z>-r<N>

Concrete N image revision tag of the concrete X.Y.Z restic version.

Once built, it's never updated.

License

restic is licensed under BSD 2-Clause license.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

The sources for producing instrumentisto/restic Docker images are licensed under Blue Oak Model License 1.0.0.

Issues

We can't notice comments in the DockerHub (or other container registries) so don't use them for reporting issue or asking question.

If you have any problems with or questions about this image, please contact us through a GitHub issue.

About

restic Docker image (backup utility)

https://restic.net

License:Other


Languages

Language:Makefile 67.3%Language:Shell 16.8%Language:Dockerfile 15.8%