[URGENT] Run Gitea backup before hardening changes #990

Closed
opened 2026-03-22 19:12:50 +00:00 by perplexity · 1 comment
Collaborator

Parent

  • #971 — Urgent: falsework and security and gitea database robustness

Objective

Create a full backup of the Gitea instance before applying any security hardening.

Scope

  • Run the backup script provided in #971 issue body
  • Verify backup includes: database, repositories, custom config, attachments
  • Move backup to off-site storage (not on the same VPS)
  • Verify backup can be restored on a clean instance

Backup Script (from #971)

#!/bin/bash
BACKUP_DIR="/opt/gitea/backups"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
GITEA_CONF="/etc/gitea/app.ini"
GITEA_WORK_DIR="/var/lib/gitea"
mkdir -p $BACKUP_DIR
cd $BACKUP_DIR
gitea dump -c $GITEA_CONF
chmod 600 $BACKUP_DIR/*.zip

Acceptance Criteria

  • Backup zip exists and is > 0 bytes
  • Backup is copied to off-site location
  • This is done BEFORE any app.ini changes

Blocked By

Nothing — do this first, before #988 and #989.

## Parent - #971 — Urgent: falsework and security and gitea database robustness ## Objective Create a full backup of the Gitea instance before applying any security hardening. ## Scope - Run the backup script provided in #971 issue body - Verify backup includes: database, repositories, custom config, attachments - Move backup to off-site storage (not on the same VPS) - Verify backup can be restored on a clean instance ## Backup Script (from #971) ```bash #!/bin/bash BACKUP_DIR="/opt/gitea/backups" TIMESTAMP=$(date +"%Y%m%d_%H%M%S") GITEA_CONF="/etc/gitea/app.ini" GITEA_WORK_DIR="/var/lib/gitea" mkdir -p $BACKUP_DIR cd $BACKUP_DIR gitea dump -c $GITEA_CONF chmod 600 $BACKUP_DIR/*.zip ``` ## Acceptance Criteria - [ ] Backup zip exists and is > 0 bytes - [ ] Backup is copied to off-site location - [ ] This is done BEFORE any app.ini changes ## Blocked By Nothing — do this first, before #988 and #989.
claude was assigned by Rockachopa 2026-03-22 21:44:38 +00:00
Owner

PR #996 adds scripts/gitea_backup.sh — a version-controlled backup script.

What I did: Created a robust backup script that runs gitea dump, verifies the output (checks for DB, repos, config, app.ini), locks down permissions, and optionally rsyncs to off-site storage.

What still needs human action: The actual backup must be run on the VPS with sudo access:

ssh root@143.198.27.163
sudo bash scripts/gitea_backup.sh user@backup-host:/backups/gitea/

This is a server-side operation that cannot be performed via the Gitea API. Please run this before proceeding with #988 and #989 (app.ini hardening).

PR #996 adds `scripts/gitea_backup.sh` — a version-controlled backup script. **What I did:** Created a robust backup script that runs `gitea dump`, verifies the output (checks for DB, repos, config, app.ini), locks down permissions, and optionally rsyncs to off-site storage. **What still needs human action:** The actual backup must be run on the VPS with sudo access: ```bash ssh root@143.198.27.163 sudo bash scripts/gitea_backup.sh user@backup-host:/backups/gitea/ ``` This is a server-side operation that cannot be performed via the Gitea API. Please run this **before** proceeding with #988 and #989 (app.ini hardening).
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#990