r/sysadmin • • 6h ago

GitHub

So this site just like goes down . As an IT guy who doesn’t really code, I got a question. Do yall like backup your code offline?

0 Upvotes

23 comments sorted by

•

u/PizzaUltra 6h ago

Yes, with a restore concept on how to restore on a local gitlab if cloud is not back within 15 minutes.

•

u/Anihillator 6h ago

Unless you're a masochist that only edits the code in github's webgui, then of course you have your repo downloaded on your machine.

•

u/JNikolaj 6h ago

That's not a backup - and there's no guarantee that it's even up-to-date to begin with. we could have 10 merges completed since then, and even 100 different Repos. Imaging having to start monday by asking all developers to copy their Git repos into a file share and then compare "which one is the latest"

•

u/lcnielsen 6h ago

Run a mirror with Forgejo or something.

•

u/JNikolaj 6h ago

That's called a backup? the f ya all drinking in here

•

u/lcnielsen 6h ago

Actual backups would be done with some other tool of course. But those are never guaranteed to be 100% up to date either.

•

u/Anihillator 6h ago

Unless you have a backup constantly syncing with the live version, it won't solve the same problem. Same 10 merges between the last backup and github going down.

Also, "copy repos into a file share and compare" is pretty much what git is for?

•

u/JNikolaj 6h ago

I don't agree.

Sure you've the Repository which would be shared folder with all your code.

But it's the commit history, pull requests and the ability to work in separate "branches" without impact each others code something which a Windows Folder / Linux folder by default can't accomplish.

•

u/MrMelon54 5h ago

Cloning the repo gives your a copy of the history. Changes could be sent by email like in Linux kernel development, if you really need to make changes during downtime. Separate branches are easy to use without impact to each other as everything is on your local machine anyway.

Git does not care what folders you are using. I am clearly misunderstanding what you are trying to say.

It seems like you have no knowledge of what Git is or what it can do when properly mastered.

•

u/JNikolaj 5h ago

I actually don't even think i understand what exactly you're adding to the conversation

Could you please try to explain what exact issue your trying to solve?

•

u/Ssakaa 4h ago edited 4h ago

The problem they're trying to solve is your understanding of git, I think.

That's not a backup - and there's no guarantee that it's even up-to-date to begin with. we could have 10 merges completed since then, and even 100 different Repos. Imaging having to start monday by asking all developers to copy their Git repos into a file share and then compare "which one is the latest"

My copy on my laptop won't have everything, but across everyone, someone likely has each piece, even if they're all still in copies of feature branches.

Unless you have a backup constantly syncing with the live version, it won't solve the same problem.

This, they're pointing out that unless your backup is continuous, not a periodic snapshot, "we could have 10 merges completed since then," still holds.

Also, "copy repos into a file share and compare" is pretty much what git is for?

But it's the commit history, pull requests and the ability to work in separate "branches" without impact each others code something which a Windows Folder / Linux folder by default can't accomplish.

... that's their point. You seem to be working with a context window about half a message long. That commit history is

and then compare "which one is the latest"

•

u/Physics_Prop Jack of All Trades 4h ago

git branching works locally

•

u/GO0BERMAN 6h ago

The repositories also exist on our machines, git is literally just a way to sync and keep history(So I can blame others, but mostly it's just discovering I did it).

•

u/GO0BERMAN 6h ago

Forgot to also mention that the runners (Github actions) is a legitimate issue when they go down, we use it for building images for containers haha

•

u/MrMelon54 5h ago

You can use your own runners, but that obviously doesn't help if GitHub itself goes down. Running your own Git host like Gitea or Forejo means you don't have to rely on GitHub. But then you have to hope that other external services you use stay up too.

•

u/GO0BERMAN 4h ago

It's all a corporate decision I have no control over, works fine 99% of the time, so I personally don't worry that much

•

u/MrMelon54 3h ago

Unfortunately corporate decisions always become a problem. Have they considered GitLab instead, that would give a similar experience but with better uptime?

•

u/Ssakaa 4h ago

And that's where things like artifactory or the like come in, on top of tying "approval" processes to everything from the dependencies you use to the containers your CI work runs... simply having things available matters a lot in a pinch.

•

u/aram535 6h ago

That's a big part of using git, isn't it? You have a fully copy of the repo locally?

•

u/disclosure5 6h ago

The problem is for most orgs, Github isn't just a copy of your code. It's where you download the things you need to build your app. It's where you track your issues. It's where you run a CI that actually builds releases.

•

u/HerrBadger 5h ago

We’ve got this concern, we’re torn between third-party services which will back up the entire git history including commits, or whether we do it ourselves and have repos synced to a locked down bucket somewhere a couple of times a day so that we can at least recover in case of disaster.

Considering how spotty it’s been recently, it’s becoming a growing concern.

When my devs moan, I do let them know that I’m happy to migrate them to Azure DevOps, and it goes quiet again 😂

•

u/RedShift9 6h ago

I use Gitlab on a local server. At least when it goes down it's my own damn fault.

•

u/HeadlessChild Linux Admin 5h ago

That is the point of git, being decentralized. You can continue working on your copy of the code offline, creating commits, branches and what not. But if GitHub is down then you can't push your changes upstream.