Forgejo Backups
Contact Information
- Owner
- 
Fedora Infrastructure Team 
- Contact
- 
#fedora-admin, sysadmin-main 
- Purpose
- 
Provide basic orientation and introduction to the sysadmin group 
Requirements
- 
Administration of Forgejo requires group sysadmin-openshiftaccess.
- 
Administration of Forgejo backups requres group sysadmin-mainaccess in order to access theos-controlmachines.
Troubleshooting Steps
On the os-control machines for prod and staging, two cronjobs related to backups exist. The backup runs at 2am UTC, the pruning at 3am UTC nightly.
0 2 * * * /root/ocp4/openshift-apps/forgejo/backups/run_forgejo_backup.sh >> /root/ocp4/openshift-apps/forgejo/backups/log/backup_cronjob.log 2>&1 0 3 * * * /root/ocp4/openshift-apps/forgejo/backups/run_forgejo_pruning.sh >> /root/ocp4/openshift-apps/forgejo/backups/log/prune_cronjob.log 2>&1
The run_forgejo_backup.sh script connects into the Forgejo container, performs a backup creation, then copies the data dump out of the container onto the os-control machine.
The run_forgejo_pruning.sh script prunes older backup files.
- 
We keep 7 days rolling backups, older backup files are pruned. 
- 
at the end of each week, the last daily backup becomes a weekly backup. We keep the last 4 weekly backups, older weekly backups are pruned. 
- 
at the end of each month, the last weekly backup becomes a monthly backup. We keep the last 12 months backups, older months are pruned. 
- 
at the end of the year, the last monthly backup becomes a yearly backup. We keep one yearly backup for every year. 
- 
An S3 bucket is mounted at /root/ocp4/openshift-apps/forgejo/backups/s3-mount/
- 
Backup files are synced to AWS S3. 
Want to help? Learn how to contribute to Fedora Docs ›