1
Fork 0
dotfiles/.bauke/Restic Backups.md

935 B

Credentials

File location is $BAUKE_DIR/data/restic-b2-credentials.zsh.

export B2_ACCOUNT_ID=""
export B2_ACCOUNT_KEY=""
export RESTIC_PASSWORD=""
export RESTIC_REPOSITORY=""

Commands

The restic-b2 command is located in .aliases.zsh.

  • Create a new snapshot:
restic-b2 backup --tag '<month> <year>' <directory>
  • List snapshots:
restic-b2 snapshots
  • Restore a snapshot:
restic-b2 restore <snapshot ID> --target <directory>
  • Check snapshot health:
restic-b2 check

Backups

  • Monthly music library backup:
restic-b2 backup --tag "$(date -d "$(date +'%Y-%m-01') -1 day" +'%B %Y')" ~/Beets
  • KeePassXC database:
restic-b2 backup ~/Bauke.kdbx