From bad58cef4935d8674555150910725571cd4f9d90 Mon Sep 17 00:00:00 2001 From: Matt Speer Date: Sat, 3 Oct 2026 12:35:36 -0500 Subject: [PATCH] updated docker backup directory destination to fix permissions error. --- gitea_backup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gitea_backup.sh b/gitea_backup.sh index 499b3be..9414f32 100644 --- a/gitea_backup.sh +++ b/gitea_backup.sh @@ -64,9 +64,9 @@ mkdir -p "$CURRENT_BACKUP_DIR" # ============================================================================== echo "Starting Gitea backup ($TIMESTAMP)..." -# Step 1: Trigger in-container gitea dump using official documentation command structure +# Step 1: Ensure staging folder exists and trigger in-container dump echo "Executing 'gitea dump' inside container '$CONTAINER_NAME'..." -docker exec -u git -w /tmp "$CONTAINER_NAME" bash -c '/usr/local/bin/gitea dump -c /data/gitea/conf/app.ini -f /data/gitea-dump.zip' +docker exec -u git -w /tmp "$CONTAINER_NAME" bash -c 'mkdir -p /data/gitea/tmp && /usr/local/bin/gitea dump -c /data/gitea/conf/app.ini -f /data/gitea/tmp/gitea-dump.zip' DUMP_STATUS=$? if [ $DUMP_STATUS -ne 0 ]; then @@ -77,10 +77,10 @@ if [ $DUMP_STATUS -ne 0 ]; then fi # Step 2: Verify dump file exists on host data volume -GITEA_DUMP_FILE="$GITEA_DATA_DIR/gitea-dump.zip" +GITEA_DUMP_FILE="$GITEA_DATA_DIR/gitea/tmp/gitea-dump.zip" if [ ! -f "$GITEA_DUMP_FILE" ]; then - echo "Error: Could not locate generated 'gitea-dump.zip' in '$GITEA_DATA_DIR'." >&2 + echo "Error: Could not locate generated 'gitea-dump.zip' in '$GITEA_DATA_DIR/gitea/tmp'." >&2 curl -H "Authorization: Bearer $NTFY_TOKEN" -d "Error: Gitea backup zip file missing after exec." "$NTFY_SERVER/$NTFY_TOPIC" > /dev/null 2>&1 rm -rf "$CURRENT_BACKUP_DIR" exit 1