Skip to content

Commit

Permalink
fix(modules/backup): remove reference to RESTIC_REPOSITORY in backup …
Browse files Browse the repository at this point in the history
…script (#192)
  • Loading branch information
brianmcgee authored Mar 30, 2023
1 parent b3bb59d commit 68e419d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion modules/backup/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@
# first we ensure the repo exists
if ! $RESTIC_CMD snapshots > /dev/null; then
echo "Creating repo: $RESTIC_REPOSITORY"
$RESTIC_CMD init
fi
Expand Down
7 changes: 1 addition & 6 deletions modules/restore/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@
echo "Running restore"
# we only perform a restore if the directory is empty
if [ "$(ls -A $STATE_DIRECTORY)" ]; then
echo "$STATE_DIRECTORY is not empty, restore will exit"
exit 0
fi
# we only perform a restore if the directory is empty
# restore from the repo
echo "RESTIC_REPOSITORY=$RESTIC_REPOSITORY"
echo "SNAPSHOT=$SNAPSHOT"
$RESTIC_CMD restore \
--target $STATE_DIRECTORY \
--cache-dir=$CACHE_DIRECTORY \
Expand Down

0 comments on commit 68e419d

Please sign in to comment.