Skip to content

Instantly share code, notes, and snippets.

@MatthewVance
Last active May 19, 2019 04:43
Show Gist options
  • Save MatthewVance/19b7c6a6bcd093619054484fb069fa87 to your computer and use it in GitHub Desktop.
Save MatthewVance/19b7c6a6bcd093619054484fb069fa87 to your computer and use it in GitHub Desktop.
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
export RESTIC_REPOSITORY=/Volumes/storage/matt/backup/repos/shared/
export RESTIC_PASSWORD_FILE=/etc/restic/restic-pw.txt
CACHE=/home/restic/.cache
RESTIC=/usr/local/bin/restic
# restore-size (default)
$RESTIC unlock \
--cache-dir $CACHE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment