commit e48775ccf8d3a54cbd004afa2d329cc677c08d22 parent 314841ffa1b0ba2643b72daef43a2c17d176fc01 Author: pyratebeard <root@pyratebeard.net> Date: Fri, 8 Dec 2023 12:19:57 +0000 borgit Diffstat:
A | bin/.local/bin/borgit | | | 13 | +++++++++++++ |
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/bin/.local/bin/borgit b/bin/.local/bin/borgit @@ -0,0 +1,13 @@ +#!/bin/sh + +DISK_UUID=01a800da-b83b-499f-9048-16f418f028a5 +MOUNT_DIR="/media/backup" +BACKUP_DIR="${MOUNT_DIR}/borg-$(hostname -s)::$(date +%Y%m%d)" + +sudo mount UUID="${DISK_UUID}" "${MOUNT_DIR}" || exit 1 + +BORG_PASSPHRASE=$(pass borgit) borg create -x "${BACKUP_DIR}" "${HOME}" + +rclone sync "${MOUNT_DIR}" backblaze:borgit + +sudo umount "${MOUNT_DIR}"