HUB
Sign inSign up
restic logo

instantlinux/restic

By instantlinux

•Updated 4 days ago

HelmImage
0

276

instantlinux/restic repository overview

⁠restic

Restic backup client, with supercronic to schedule routine backups.

⁠Usage
cd docker-tools/k8s
make secrets/restic-b2-apikey.yml
make secrets/restic-b2-apikey
make secrets/restic-repo-password.yml
make secrets/restic-repo-password

This image comes with a helm chart with template to generate the cron jobs needed to manage restic backups stored on a local machine running the rest-server image, or on cloud storage buckets offered by Backblaze B2, Amazon S3 (or compatible, such as GarageFS or Minio). Attach the volumes you want backed up -- via values overrides of the helm chart -- and define the paths to be backed up to each bucket with specifications like this:

repos:
# example -- all fields optional (defaulted under cron) except src
  home:
    dests: [ "$REPO_B2_HOME:", "$REPO_LOCAL/" ]
    key: home
    retain: --keep-hourly=3
    src: /b/home
    hours: 1,9,17
    weekdays: 2,6
  misc:
    src: /b/samba_dos /b/ftp /b/jira/home/data /b/pc/MP3

Before the first backup, each repo destination must be initialized manually. Acquire an API key from the cloud provider (or set the htpasswd for a local rest-server backend), then invoke restic init:

export B2_ACCOUNT_ID=<MY_APPLICATION_KEY_ID>
export B2_ACCOUNT_KEY=<MY_APPLICATION_KEY>
restic init --repo b2:bucket-name:new-repo

The application requires one kernel privilige, DAC_READ_SEARCH, but otherwise runs as non-root.

⁠Variables

These variables can be passed to the image from docker-compose.yml as needed:

VariableDefaultDescription
TZUTCTimezone for launching cron jobs

Container UID is 2006.

⁠Volumes

Mount these directories to the container using the helm chart:

Container PathDescription
/home/restic-bkp/crontabcron jobs defined by helm template
/home/restic-bkp/.cache/resticcache
/var/logcontainer logs
/b/*1 or more paths to back up (read-only)
⁠Secrets
SecretDescription
b2-apikeyAPI key for B2 service
s3-apikeyAPI key for S3 service
repo-passwordhtpasswd for accessing a local rest-server
⁠Contributing

If you want to make improvements to this image, see CONTRIBUTING⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:10a0efcb9…
Size
28.8 MB
Last updated
4 days ago
docker pull instantlinux/restic:latest