updated docker backup directory destination to fix permissions error.

This commit is contained in:
mattspeer committed 2026-10-03 12:35:36 -05:00
1 parent 9555b36133
commit bad58cef49
1 file changed
+4 -4
+4 -4
View File
@@ -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