You want a disaster-recovery copy of all your GitHub repositories.
IntermediateScenarioScale, Submodules, LFS and GitHub Automation
Answer
Situation read → Git data is easy to back up; GitHub metadata is not.
What I'd do →
- Scheduled mirror:
git clone --mirrorthen regulargit remote update --prune, stored in object storage. - Export metadata (issues, PRs, wikis) via the API or the migrations API.
- Back up Actions secrets configuration as code (Terraform), not values.
- Test a restore regularly.
Why → A backup that has never been restored is a hope, not a backup.
Interview tip → Every developer clone is also a partial backup of code, but not of issues or PRs.
More on Scale, Submodules, LFS and GitHub Automation
A monorepo has 4 GB of history and developers only touch one service. How do you make their day-to-day faster?IntermediateDesigners commit PSD and video assets, and the repo keeps growing. How do you move them to Git LFS?IntermediateYour GitHub LFS bandwidth quota is exhausted and CI pulls fail. What do you do?AdvancedA repository uses a submodule. How does a developer get the right version of it?BeginnerSubmodules, subtree or a package manager for sharing code between repos?IntermediateCI cannot clone a private submodule: authentication fails in `actions/checkout`.Intermediate