Borgbackup backblaze B2 uploading?

I’ve just configured this.

rclone for BackBlaze B2

Basic script:

#Let’s set some variables
DATA="/mnt/goodies /mnt/private /mnt/music"
REPO="/mnt/backup/HomeBackup"
TODAY=$(date +%Y%m%d)
EXCLUDE="–exclude ‘sh:/mnt/goodies/Downloads/*’“
BORG=/usr/local/bin/borg
PRUNEDATES=”–keep-daily=7 --keep-weekly=4 --keep-monthly=12"
REPOPATH="/mnt/backup"
CLOUDDEST=“backblaze:borgbackuphome”

#Is backup mounted? It should have happened at boot via SystemD
if [ mount | grep backup | wc -l == “1” ]
then

#Build a bear, er, command
$BORG create $REPO::$TODAY $DATA $EXCLUDE

#and then we prune
$BORG prune $REPO $PRUNEDATES

#and finally, let’s chuck this up to the ‘cloud’
rclone sync $REPOPATH $CLOUDDEST -v
else
echo /mnt/backup isn’t mounted, this is an issue
sendEmail -f My@Address.me -t My@Address.me -u No Backup -m Backup did not happen. Check it. -s SMTP -xu SMTP-USER -xp SMTP-PASSWD
fi

That’s it. Depends on sendemail, borgbackup and rclone.

If you want to restore use the local repo you’ll be keeping for borg, else if your house burns down you will need to pull the whole repo back down somewhere and do a restore.

I’ve set B2 to only keep the latest file and no backups as Borg Backup is doing all that for me.