How to back up a Gitea instance and verify the restore across database, repos and attachments
Gitea stores its data in three separate places: a database, a repository directory, and configuration with attached files, so each must be backed up. The built-in gitea dump command produces a single archive but has limits, including needing extra disk space, long run times, and possible inconsistency between database and repositories. For larger instances, the guide recommends backing up each component separately with its own tooling. A sample script using pg_dump, tar and S3 uploads illustrates the approach, with pipefail, timestamped filenames and excluded index and log directories. The article stresses that a backup is only trustworthy once a restore has been tested.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in