I posted a variety of the Restic related scripts and config files I use as gists. While they’re all tailored for my unique use case, I decided to publish them in case anyone can benefit from seeing additional examples.
How I use Restic is admittedly unusual so a bit of background may help the various examples make more sense:
- The repo is maintained on a raid-10 volume on my Linux server.
- The server backs itself up via the standard restic backup command since the repo is locally accessible.
- The server also runs scheduled jobs (via systemd timers) for maintenance tasks.
- The local repo is synced to AWS S3 via the AWS CLI for offsite storage. Except for a disaster or disk failure, I can restore locally as much as I want without worrying about S3 retrieval fees (at the expense of local disk space usage).
- The server makes the repo available over to clients on my local network via REST. This is done via RClone’s ability to serve restic’s REST backend API over HTTP. Caddy is used to reverse proxy to the service exposed by Rclone. This provides a bit security control over how the API is exposed.
This all requires a few prerequisites which I have not (at least at this time) published gists for. Basically, most everything runs as a service account so user/group permissions and Linux capabilities (setcap) will need to be configured appropriately.
This is certainly an atypical use case. While I’m not advocating for anyone to adopt this, I still thought a few of the examples could benefit the community. I also know room for improvement exists so I’m open to suggestions.
The biggest feature I would still like to implement is auto-monitoring for failures so I do not have to periodically check the log outputs to see if
restic check returned any errors or if the maintenance script fails due to the repo not getting unlocked (happens to me occasionally, likely due to a laptop disconnecting during the middle of a backup).