dotfiles/executable_backup.sh

21 lines
859 B
Bash

#!/bin/bash
# default number of backups that are kept, per path per host.
# will be overwritten by -k
export KEEPLAST=7
# location of backup repository, hostname may be defined
# in .ssh/config
# at this location an initialized repository must exist
# (this can be done with `restic init`)
export RESTIC_REPOSITORY="sftp:user@anthe:/mnt/external/private/personal"
export RESTIC_EXCLUDE="/home/user/Pictures"
# Password that is supplied to `restic init`
export RESTIC_PASSWORD=$(sudo cat /etc/backup/personal.pass)
exec restic "$@" --exclude=${RESTIC_EXCLUDE} --exclude="/home/user/.cache" --exclude="/home/user/.config/VSCodium/Cache/" --exclude="/home/user/.config/VSCodium/CachedData/" --exclude="/home/user/.config/VSCodium/CachedExtensions/" --exclude="/home/user/.config/VSCodium/CachedExtensionVSIXs/"
unset RESTIC_REPOSITORY
unset RESTIC_PASSWORD