Interview Prep/Git & GitHub/Scale, Submodules, LFS and GitHub Automation

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 →

  1. Scheduled mirror: git clone --mirror then regular git remote update --prune, stored in object storage.
  2. Export metadata (issues, PRs, wikis) via the API or the migrations API.
  3. Back up Actions secrets configuration as code (Terraform), not values.
  4. 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.

All Git & GitHub questions Roadmap: Git & GitHub

More on Scale, Submodules, LFS and GitHub Automation