Most companies rely on a SaaS based source control solution (GitHub, ADO, GitLabs, Codeberg, etc.). While this helps with issues are code loss from an individual POV (your laptop dies, you delete something). How do you back it up at scale should something happen to the service?
I know people, rightfully, joke about GitHub’s uptime, but what if it were to go hard down for an extended period of time?
So lemmings, how would you back up an organization’s source control?
Edit: a lot of people are focusing on personal or home. I’m wondering about corporate level without having on-premise resources.


If you have a repo cloned locally and hosted on the remote, then you have the repo saved to two different places (although possibly without all the refs locally but you likely have your main/dev/etc branch at least).
What I’ve been wanting to do once I get my NAS working again is host the repos on that instead. You can make a mirror of a repository very easily, so if you want to mirror a GitHub repo onto another service or a NAS or something (or the other way around, NAS -> GH for example), it’s really only a couple commands to fully back it up, and you could just put that in a cron job or hook.
I have a QNAP box at home, with Forgejo running as a container on it. It’s pretty much a standard docker install straight from Forgejo’s repository. It can run tests and a build on each push, which is not strictly necessary, but nice. Took me about half an hour to setup Forgejo, and about 4 hours of swearing setting up CI for a few repos, because I’ve never done it before.
This doesn’t easily scale to a whole organisation’s worth of repos like OP wants, but it easily fits a small business/single dev situation.