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.

  • TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 days ago

    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.