#!/usr/bin/env bash set -euo pipefail source /sync/scripts/backup_resources.sh # FSFIXME expand_aliases still needed? shopt -s expand_aliases # make aliases work ############################### ### update local backup dir ### ############################### BACKUP_DIR=/sync/backup ensureDirectory $BACKUP_DIR BACKUP_DIR_HOME=$BACKUP_DIR/home ensureDirectory $BACKUP_DIR_HOME backupDirectory $HOME/.ssh/ $BACKUP_DIR_HOME/.ssh/ ##################### ### upload backup ### ##################### if [[ "$1" == "--noupload" ]]; then exit 0; fi sd rsync_backup -e "ssh -i /home/fabian/.ssh/id_ed25519" $BACKUP_DIR/ fabian@garrus:/citadel/backup/shepard/