Automated backup - 20250714_181856
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user