From 4f281fbcb08d1b8fba72f681aee11f8be4070bde Mon Sep 17 00:00:00 2001 From: turtlebasket Date: Sun, 25 Jun 2023 09:23:54 -0700 Subject: [PATCH] encrypted backups + tweaks --- .gitignore | 9 +++++++++ cuddlefish/backup | 8 ++++---- cuddlefish/docker-compose.yaml | 5 +++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 55a58f3..0cf6b81 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,12 @@ Temporary Items # .nfs files are created when an open file is removed but is still being accessed .nfs* +# Keys & Secrets +*.key +*.asc +*.txt + +# Backups +*.tar.gz +*.tar.gz.enc +*.tar.gz.age diff --git a/cuddlefish/backup b/cuddlefish/backup index ea56d23..db28390 100755 --- a/cuddlefish/backup +++ b/cuddlefish/backup @@ -1,11 +1,11 @@ #!/bin/bash - # NOTE: DEPENDING ON PERMISSIONING, YOU MAY NEED TO RUN THIS SCRIPT USING SUDO source .env DATESTRING=$(date +"%Y-%m-%d_%H%M%S" | tr '[:upper:]' '[:lower:]' | tr ' ' '_') ARCHIVE="gitea-data-${DATESTRING}.tar.gz" -tar -czvf $ARCHIVE gitea-data/ -scp -i $BACKUP_KEYPATH -P $BACKUP_SSH_PORT $ARCHIVE $BACKUP_HOST:~/backups/ -rm $ARCHIVE && echo Removed $ARCHIVE. +tar -czvf $ARCHIVE gitea-data/ && \ + age -e -r age1grpe9c934q09933g7mxne03z7k6e572tjcqxdkne6rwyfht2saeq90sf3f -o $ARCHIVE.enc $ARCHIVE && \ + scp -i $BACKUP_KEYPATH -P $BACKUP_SSH_PORT $ARCHIVE.enc $BACKUP_HOST:~/backups/ +rm -f $ARCHIVE $ARCHIVE.age && echo Removed $ARCHIVE, $ARCHIVE.enc. diff --git a/cuddlefish/docker-compose.yaml b/cuddlefish/docker-compose.yaml index 3acf857..4d8fa6f 100644 --- a/cuddlefish/docker-compose.yaml +++ b/cuddlefish/docker-compose.yaml @@ -6,6 +6,10 @@ networks: services: + # ======================================== + # GIT.MICHAELLISANO.COM + # ======================================== + gitea-server: image: gitea/gitea:1.19.3 container_name: gitea @@ -33,3 +37,4 @@ services: networks: - gitea +