Skip to content

Instantly share code, notes, and snippets.

View MatthewVance's full-sized avatar

Matthew Vance MatthewVance

View GitHub Profile
@MatthewVance
MatthewVance / restic-daily-maintenance.service
Created May 18, 2019 15:00
Restic backup maintenance script, scheduled with a systemd timer rather than cron job.
[Unit]
Description=Runs daily restic maintenance script
[Service]
Type=oneshot
ExecStart=/etc/restic/restic-maintenance-daily.sh
User=restic
@MatthewVance
MatthewVance / restic-exclude-file-linux
Created May 18, 2019 15:04
Restic backup exclude file example for Linux.
/dev/*
/home/*/.bash_history
/home/*/.cache/chromium
/home/*/.local/share/Trash
/home/*/.mozilla/firefox/*/Cache
/home/*/Documents/Exclude/*
/lib/modules/*/volatile/.mounted
/media/*
/mnt/*
/proc/*
@MatthewVance
MatthewVance / restic-aws-daily.service
Created May 18, 2019 15:08
Example script and systemd scheduled service to sync local repo to AWS S3. This is if you prefer to backup locally on your network and sync a copy to S3 rather than use Restic to automatically interface with a S3 based repo.
[Unit]
Description=Runs daily aws sync script
[Service]
Type=oneshot
ExecStart=/etc/restic/aws.sh
@MatthewVance
MatthewVance / restic-snapshots.sh
Created May 18, 2019 15:12
Example bash shell script to return a list of Restic snapshots.
#!/bin/bash
#: Title : restic
#: Date : July 22 2018
#: Author : Matt Vance
#: Version : 1.0
#: Description : Script to fully sytem backlup
#: License : MIT License (MIT)
# Copyright (C) 2018 Matthew Vance
@MatthewVance
MatthewVance / restic-init.sh
Created May 18, 2019 15:13
Example bash shell script to initialize a new Restic repo.
#!/bin/bash
#: Title : restic-init-local
#: Date : July 16 2018
#: Author : Matt Vance
#: Version : 1.0
#: Description : Script to create local restic repo
#: License : MIT License (MIT)
# Copyright (C) 2018 Matthew Vance
@MatthewVance
MatthewVance / restic-backup-daily.sh
Created May 18, 2019 19:49
Restic daily and hourly backup scripts with systemd timers.
#!/bin/bash
#: Title : restic
#: Date : July 15 2018
#: Author : Matt Vance
#: Version : 1.1
#: Description : Script to fully sytem backlup
#: License : MIT License (MIT)
# Copyright (C) 2019 Matthew Vance
@MatthewVance
MatthewVance / restic-backup-weekly.sh
Created May 18, 2019 19:56
Script to backup a Raspberry Pi weekly to a Restic over the network via REST.
#!/bin/bash
#: Title : restic
#: Date : October 13, 2018
#: Author : Matt Vance
#: Version : 1.0
#: Description : Script to run regular restic backups
#: License : MIT License (MIT)
# Copyright (C) 2018 Matthew Vance
@MatthewVance
MatthewVance / Caddyfile
Last active March 6, 2025 16:33
Caddy config (Caddyfile) and systemd service to reverse proxy Restic REST server running via Rclone.
bind 192.168.1.106:8889
tls /etc/caddy/ssl/host_name-bundle.pem /etc/caddy/ssl/end_device-key.pem {
protocols tls1.2 tls1.3
}
# Reverse proxy to rclone restic rest service
proxy / localhost:8080 {
# health_check /
transparent
max_conns 1024
@MatthewVance
MatthewVance / restic-unlock.sh
Last active May 19, 2019 04:43
Bash script to unlock a Restic repo.
#!/bin/bash
#: Title : restic unlock
#: Date : April 26, 2019
#: Author : Matt Vance
#: Version : 1.0
#: Description : Script to manually unlock repo
#: License : MIT License (MIT)
# Copyright (C) 2019 Matthew Vance
@MatthewVance
MatthewVance / restic-stats.sh
Created May 18, 2019 20:59
A script to return various stats about a Restic repo.
#!/bin/bash
#: Title : restic stats
#: Date : October 14, 2018
#: Author : Matt Vance
#: Version : 1.0
#: Description : Script to fully sytem backlup
#: License : MIT License (MIT)
# Copyright (C) 2018 Matthew Vance