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.

  • hperrin ( hperrin@lemmy.ca ) 
    link
    fedilink
    English
    arrow-up
    9
    ·
    5 days ago

    I switched off of GitHub to my own Forgejo instance. It’s been great. I still mirror to GitHub just in case, but my Forgejo instance has had much better uptime than GitHub. xD

  • TehPers ( TehPers@beehaw.org ) 
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 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.

    • Dave. ( dgriffith@aussie.zone ) 
      link
      fedilink
      arrow-up
      2
      ·
      6 days ago

      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.

    • who ( who@feddit.org ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      Also, I had to read OP’s second sentence five times before I could start to make sense of it. A comma would have helped a lot there.

      • It’s what happens to phrasal verbs when they become nouns and adjectives. I couldn’t find a great source other than this writing tip, but “back up” altogether makes up a phrasal verb.

        English is rather notorious for having these phrases that when translated directly don’t make any sense: the words on their own are rather meaningless and have to be taken together to derive the meaning:

        • speak up (verb)
        • slow down (verb) → slowdown (noun)
        • shut down (verb) → shutdown (noun)
        • piss off

        For example, I can’t translate “speak up” to “hablar arriba” in Spanish, that makes absolutely no sense.

  • bignose ( bignose@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 days ago

    I’m wondering about corporate level without having on-premise resources.

    You’re necessarily, then, talking about paying for some other party to host resources at some other location(s). So the corporation needs to shop around for a deal for hosting web services.

    Assuming the matter of hosting is taken care of, then, which service to run? In order to not be locked in to some proprietary provider, I would strongly recommend free-software community-maintained forge software. Something like Forgejo or Sourcehut.

  • Orvorn ( orvorn@slrpnk.net ) 
    link
    fedilink
    arrow-up
    1
    ·
    6 days ago

    I am very interested in Lore source control because my projects are typically a mix of assets, not just code. I haven’t switched to it yet though.

  • locuester ( locuester@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    I use local Gitea hosted on a pi cluster. I only push open source stuff I want to share to github. Most of my code does not push there anymore. No reason to give them training data without compensation.

    My local gitea has its database and files on a NAS storage device, which encrypts and backs up to an AWS S3 bucket in another continent.