Skip to content

Instantly share code, notes, and snippets.

@MatthewVance
Created May 18, 2019 15:13
Show Gist options
  • Save MatthewVance/2190566aaf0d5440003927d5765f9280 to your computer and use it in GitHub Desktop.
Save MatthewVance/2190566aaf0d5440003927d5765f9280 to your computer and use it in GitHub Desktop.
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
export RESTIC_REPOSITORY=/Volumes/storage/matt/backup/repos/shared/
export RESTIC_PASSWORD_FILE=/etc/restic/restic-pw.txt
CACERT=/etc/restic/gryffindor-bundle.pem
CACHE=/home/restic/.cache
RESTIC=/usr/local/bin/restic
$RESTIC --cacert $CACERT init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment