encrypted backups + tweaks
parent
76fda3f1d5
commit
4f281fbcb0
|
@ -81,3 +81,12 @@ Temporary Items
|
||||||
# .nfs files are created when an open file is removed but is still being accessed
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
.nfs*
|
.nfs*
|
||||||
|
|
||||||
|
# Keys & Secrets
|
||||||
|
*.key
|
||||||
|
*.asc
|
||||||
|
*.txt
|
||||||
|
|
||||||
|
# Backups
|
||||||
|
*.tar.gz
|
||||||
|
*.tar.gz.enc
|
||||||
|
*.tar.gz.age
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# NOTE: DEPENDING ON PERMISSIONING, YOU MAY NEED TO RUN THIS SCRIPT USING SUDO
|
# NOTE: DEPENDING ON PERMISSIONING, YOU MAY NEED TO RUN THIS SCRIPT USING SUDO
|
||||||
|
|
||||||
source .env
|
source .env
|
||||||
|
|
||||||
DATESTRING=$(date +"%Y-%m-%d_%H%M%S" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')
|
DATESTRING=$(date +"%Y-%m-%d_%H%M%S" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')
|
||||||
ARCHIVE="gitea-data-${DATESTRING}.tar.gz"
|
ARCHIVE="gitea-data-${DATESTRING}.tar.gz"
|
||||||
tar -czvf $ARCHIVE gitea-data/
|
tar -czvf $ARCHIVE gitea-data/ && \
|
||||||
scp -i $BACKUP_KEYPATH -P $BACKUP_SSH_PORT $ARCHIVE $BACKUP_HOST:~/backups/
|
age -e -r age1grpe9c934q09933g7mxne03z7k6e572tjcqxdkne6rwyfht2saeq90sf3f -o $ARCHIVE.enc $ARCHIVE && \
|
||||||
rm $ARCHIVE && echo Removed $ARCHIVE.
|
scp -i $BACKUP_KEYPATH -P $BACKUP_SSH_PORT $ARCHIVE.enc $BACKUP_HOST:~/backups/
|
||||||
|
rm -f $ARCHIVE $ARCHIVE.age && echo Removed $ARCHIVE, $ARCHIVE.enc.
|
||||||
|
|
|
@ -6,6 +6,10 @@ networks:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
# ========================================
|
||||||
|
# GIT.MICHAELLISANO.COM
|
||||||
|
# ========================================
|
||||||
|
|
||||||
gitea-server:
|
gitea-server:
|
||||||
image: gitea/gitea:1.19.3
|
image: gitea/gitea:1.19.3
|
||||||
container_name: gitea
|
container_name: gitea
|
||||||
|
@ -33,3 +37,4 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- gitea
|
- gitea
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue