#!/usr/bin/env bash ## Setup Path and file for logging LOGPATH="/var/log/borg" mkdir -p $LOGPATH export LOGFILE="$LOGPATH/backup_docker.log" ## Path to private-key PRIVATE_KEY_FILE="./id_ed25519" ## URL of storage server ## samle url scheme used by Hetzner storage services ## REPOSITORY_URL="u000000.your-backup.de" ## REPOSITORY_URL="u000000.your-storagebox.de" REPOSITORY_URL="disaster-recovery.example.com" ## Port to be used on repository server REPOSITORY_PORT="23" ## Directory of backup on server REPOSITORY_DIR="test" ## Username on repository server REPOSITORY_USER="u000000" ## Setup BORG environment export BORG_RSH="ssh -i $PRIVATE_KEY_FILE" export REPOSITORY="ssh://{$REPOSITORY_USER}@{$REPOSITORY_URL}:{$REPOSITORY_PORT}/./{$REPOSITORY_DIR}/" export BACKUP_NAME="$(date +%Y-%m-%d_%H%M)" ## Secret ## This is your passphrase used to encrypt the backup. ## If you lose this, you lose EVERYTHING! ## Keep it safe and secure. export BORG_PASSPHRASE="soe4eiCae9ohSij7Aiceesh2ZiphiHoh"