~idmyn/dotfiles

6022e37887273d47055bf095fe72a87b0587fc84 — David Mynors a month ago 6f31a91
Add backup script
4 files changed, 26 insertions(+), 0 deletions(-)

A backup.sh
M install.conf.yaml
M macOS/homebrew/Brewfile
M shell/.zshrc
A backup.sh => backup.sh +23 -0
@@ 0,0 1,23 @@
#!/usr/bin/env bash
set -euo pipefail

LOGFILE="${HOME}/.backup.log"

if [ ! -e $LOGFILE ] ; then
    touch $LOGFILE
fi

echo "Beginning backup at `date`" >> $LOGFILE

source .backup.env

restic -r b2:idmyn-mbp-restic:backup backup ~ \
    --exclude="**/node_modules"               \
    --exclude="${HOME}/desk"                  \
    --exclude="${HOME}/files"                 \
    --exclude="${HOME}/.asdf"                 \
    --exclude="${HOME}/.Trash"                \
    --exclude="${HOME}/Library"               \
    >> $LOGFILE

printf "\n*******************************************************\n\n" >> $LOGFILE

M install.conf.yaml => install.conf.yaml +1 -0
@@ 9,6 9,7 @@
- clean: ['~']

- link:
    ~/.backup.sh: backup.sh
    ~/.doom.d: emacs/.doom.d
    ~/.finicky.js: macOS/finicky/.finicky.js
    ~/.config/phoenix/phoenix.js: macOS/phoenix/phoenix.js

M macOS/homebrew/Brewfile => macOS/homebrew/Brewfile +1 -0
@@ 34,6 34,7 @@ brew "entr"
brew "trash"
brew "elvish"
brew "direnv"
brew "restic"
brew "ripgrep"
brew "tealdeer"
brew "git-crypt"

M shell/.zshrc => shell/.zshrc +1 -0
@@ 6,5 6,6 @@ PROMPT="
%~
 $ "

setopt autocd
alias q="exit"
alias ls="echo; ls"