Automated backup - 20250714_181856

This commit is contained in:
Will Song
2025-07-14 18:18:56 -05:00
parent 64cb84c62b
commit e2696447bf
2 changed files with 10 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
BACKUP_DIR="/home/will/docker_backups"
SOURCE_DIR="/home/will/docker"
REPO_URL="http://git.will123song.xyz/will/docker-configs.git" # Update this after creating repo in Gitea
REPO_URL="https://git.will123song.xyz/will/docker-configs.git"
DATE=$(date +%Y%m%d_%H%M%S)
DAY_OF_WEEK=$(date +%u) # 1-7 (Monday is 1)
DAY_OF_MONTH=$(date +%d)
@@ -78,10 +78,15 @@ create_tar_backup() {
--exclude='HA/config/*' \
--exclude='HA/db_data/*' \
--exclude='.git' \
. 2>/dev/null
--exclude='gitea/postgres' \
--exclude='HA/db_data' \
--warning=no-file-changed \
--warning=no-file-removed \
. 2>/dev/null || true
if [ $? -eq 0 ]; then
if [ -f "$BACKUP_FILE" ]; then
echo "$BACKUP_TYPE backup created successfully: $BACKUP_FILE"
ls -lh "$BACKUP_FILE"
else
echo "Error creating $BACKUP_TYPE backup"
exit 1