initial commit

master
Bryan 2020-08-24 10:36:55 -06:00
parent 5571a18a3d
commit e74c9fcaf2
2 changed files with 19 additions and 16 deletions

View File

@ -3,4 +3,8 @@
/sys
/var/run
/var/tmp
/xcfx/
/boot/
*swap*
*cache*

View File

@ -1,21 +1,21 @@
#! /bin/bash
REPO="ssh://bryan@172.16.1.83~/borg-backups"
REPO="bryan@172.16.1.83:~/borg-backups"
PASSPHRASE="uD6Db2MrhxdCoKmD4gpW"
SSH_KEY="/mnt/data/home/bryan/.ssh/id_rsa"
EXCLUDE_FILE="./backup-exclude"
DIR_TO_BACKUP="/"
export BORG_REPO=$REPO
export BORG_PASSPHRASE=$PASSPHRASE
export BORG_RSH="ssh -i $SSH_KEY"
export BORG_REPO="${REPO}"
export BORG_PASSPHRASE="${PASSPHRASE}"
export BORG_RSH="ssh -i ${SSH_KEY}"
info(){ printf "\n%s %s\n\n" "$( date )" "$*" >&2; }
trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM
info "Starting backup"
sudo borg create \
borg create \
--verbose \
--filter AME \
--list \
@ -24,7 +24,6 @@ sudo borg create \
--compression lz4 \
--exclude-caches \
--exclude-from "${EXCLUDE_FILE}" \
::'{hostname}-{now}' \
"${DIR_TO_BACKUP}"