Files
prajwal a181625c89 Initial commit: backup + mirror automation for self-hosted Gitea
Includes:
- gitea-backups/bin/backup.sh (per-push bundle + DB snapshot to local + S3)
- gitea-backups/bin/install-hooks.sh (idempotent post-receive shim installer)
- gitea-backups/bin/retention.sh (count-based retention: keep newest 7 dates)
- gitea-mirror/bin/auto-mirror.sh (Gitea -> GitHub push mirror automation,
  hardened against Gitea outages)
- crontab.txt (reference for the 3 cron entries)
- README.md (architecture, layout, bootstrap)
2026-05-09 06:02:09 +00:00

13 lines
697 B
Plaintext

# Crontab reference for the Gitea automation.
# Install with: crontab crontab.txt
# Verify with: crontab -l
# Every minute: ensure backup post-receive hook is installed in every Gitea repo
* * * * * /home/ubuntu/gitea-backups/bin/install-hooks.sh --quiet >> /home/ubuntu/gitea-backups/logs/install-hooks.log 2>&1
# Every minute: ensure every Gitea repo has a GitHub push-mirror configured
* * * * * /home/ubuntu/gitea-mirror/bin/auto-mirror.sh --quiet >> /home/ubuntu/gitea-mirror/logs/cron.log 2>&1
# Daily at 03:00 UTC: keep newest 7 calendar dates of backups (S3 + local)
0 3 * * * /home/ubuntu/gitea-backups/bin/retention.sh --quiet >> /home/ubuntu/gitea-backups/logs/retention.log 2>&1