News for hackers. Stuff that matters.
Re:'Check Your Backups Work' Day by soheil on Wednesday February 01, 2017 @01:56AM (#13538903)
Imagine if you're the CEO of Gitlab and seeing this right now. I think showing compassion and solidarity may be a better response. The problem of restoring non-existing backups should be treated as a more serious problem in our industry. This happens too often and not because people who made them were careless people but because to catch any errors when the backups are not working can take unreasonable amount of time and even then it could still just stop working one day.

We should probably treat this issue as something more like a disease like high blood pressure, namely, you don't know you have it, but it is probably doing irreparable damage to your internal organs. If we had no name for the disease or understanding of it we would just die at an earlier age without an obvious cause.

Let's identify the diseases of this sort in our industry and work on prevention, diagnosis and treatment of them instead of just saying you should have been more careful.

Re:'Check Your Backups Work' Day by ParadisoShlee on Wednesday February 01, 2017 @01:58AM (#13538916)
I have nothing, but respect for the GitLab team.... offering live notes for the recovery is stunning.
Re:'Check Your Backups Work' Day by edelans on Wednesday February 01, 2017 @04:46AM (#13539538)
Agreed ! Even when they screw things up, they make people benefit from it! Kudos for such a good spirit and dedication to your customers.

Everybody screw up from time to time in our industry. And when this happens, you have 2 types of guy : those who try to hide it, and those like Giltlab team who communicate as fast as they can because they respect their customers. Paradoxically, to me, it creates more trust than it damages it !

Re:'Check Your Backups Work' Day by sytse on Wednesday February 01, 2017 @05:07AM (#13539595)
Thanks for the kind words. I'm sorry for letting our users down. We'll ask the the 5 why's https://en.wikipedia.org/wiki/5_Whys We need to go from the initial mistake (wrong machine, solve by better hostname display and colors), to the second (not having a recent backup), to the third (not testing backups), to the fourth (not having a script for backup restores), to the fifth (nobody in charge of data durability and no written plan). The solutions above are just guesses at this point, we'll dive into this in the coming days and will communicate what we will do in a blog post.
Re:'Check Your Backups Work' Day by throwaway8124 on Wednesday February 01, 2017 @06:21AM (#13539855)
Good morning (posted from throwaway for reasons Ill describe).

I feel for you greatly here, and I commend your openness about how data restoration caused 6 hours of data loss. I too work in a critical area where even minutes DB lost is bad.

We just had our own test event recently. We make sure that we can fail everything over, and run on all secondaries. I found out how that worked; we failed. The problem with this, is I found out after the fact. Due to the secrecy, not even the teams knew why things failed the way they did. I had to piece it together from disjoint hearsay, and now I believe I have a competent picture.

So yes, when I read your post mortem and RCA, it reminded me greatly of what happened here as well. But we all can learn from your example. As for me, I'm posting it as a throwaway due to likely threats on my job.

Re:'Check Your Backups Work' Day by sytse on Wednesday February 01, 2017 @06:33AM (#13539893)
I agree that 6 hours is way too much.
Re:'Check Your Backups Work' Day by djm_ on Wednesday February 01, 2017 @06:03AM (#13539793)
Just know that your transparency here in this situation has put you leagues and bounds ahead of other vendors in my mind.

Thank you for sharing.

Re:'Check Your Backups Work' Day by jameskegel on Wednesday February 01, 2017 @08:07AM (#13540388)
I admire the response and quick action, but after reading this, I get the strong feeling Gitlab et al didn't know they were running a real business with real projects and real people who trusted you to be a good custodian of their data.
Re:'Check Your Backups Work' Day by throwaway1236t4 on Wednesday February 01, 2017 @09:38AM (#13540998)
I also would ask Why are we running our own Postgre setup and not using RDS? And then Why do we not have production Postgre DBAs on staff that would do this rather than an engineer?
Re:'Check Your Backups Work' Day by AsyncAwait on Wednesday February 01, 2017 @02:23PM (#13544018)
They want to have more control over the database and moving providers etc., which is why they're not using RDS, as was explained on the live stream.
Re:'Check Your Backups Work' Day by mozair on Wednesday February 01, 2017 @05:57AM (#13539779)
make sure everyone is doing ok, don't let them beat themselves over it

all the love and support in the world towards the team

Re:'Check Your Backups Work' Day by sytse on Wednesday February 01, 2017 @06:06AM (#13539804)
Thanks mozair. Everyone is OK but sad. I sent this tweet earlier https://twitter.com/sytses/status/826598260831842308

Thanks for the support, we've received a lot of kind reactions and are very grateful for them.

Re:'Check Your Backups Work' Day by sumbry on Thursday February 02, 2017 @11:51AM (#13551983)
If you do the 5 why's and are honest you'll discover the real root cause is not having a backup and restore procedure that is programmatic.

All outages are blameless. It's always a process failure or lack of a proper system or tool.

Re:'Check Your Backups Work' Day by nadaviv on Wednesday February 01, 2017 @05:10AM (#13539612)
Completely agree. This is 1000x better than the typical cooperate PR response that says nothing which we'll usually get. Kudos for their honesty and openness, even in a somewhat embarrassing situation such as that.
Re:'Check Your Backups Work' Day by toyg on Wednesday February 01, 2017 @05:43AM (#13539722)
it is also very, very risky from a liability perspective, both for insurance purposes and third-party indemnification. That's why most companies will keep as silent as possible.
Re:'Check Your Backups Work' Day by michaelt on Wednesday February 01, 2017 @07:53AM (#13540297)
I've never heard of anyone successfully suing AWS/Google/Azure over lost data or downtime.

And presumably even if your notes are kept private, it'll still come out in discovery if you end up in court?

What are the risks here? I'd be interested to learn more.

Re:'Check Your Backups Work' Day by toyg on Wednesday February 01, 2017 @09:41AM (#13541018)
> I've never heard of anyone successfully suing AWS/Google/Azure over lost data

Those companies have huge legal departments writing iron-clad contracts and stocking a lot of very sharp knives for any such eventuality. Smaller companies make for much easier targets.

> even if your notes are kept private, it'll still come out in discovery

Those notes might have been lost by then - that is, if their existence at any given time is even known. It is perfectly reasonable for people working quickly after an outage, to not actually write down every step or observation they make.

> What are the risks here?

Not prison, but you might be forced to pay a bunch if someone manages to get a ruling against you for negligence or the likes.

Re:'Check Your Backups Work' Day by korzun on Wednesday February 01, 2017 @12:09PM (#13542521)
> I've never heard of anyone successfully suing AWS/Google/Azure over lost data or downtime.

Doesn't mean it never happens.

Re:'Check Your Backups Work' Day by chiefalchemist on Wednesday February 01, 2017 @09:09PM (#13547475)
Imagine how deep their pockets are. Now imagine how deep your pockets would need to be to go toe to toe with them.

Sure plenty of uber larges Incs are "in the cloud" but with mission critical (read: high value worth sueing over) applications and data? That's a pretty small universe.

Re:'Check Your Backups Work' Day by mrmondo on Wednesday February 01, 2017 @02:39AM (#13539083)
I could not agree more @soheil, let me also say that Sid aka @sytse is not only a top notch CEO but he's also a hard working, caring individual who truly not only cares about the product but the whole community so, so much.
Re:'Check Your Backups Work' Day by gorodetsky on Wednesday February 01, 2017 @03:22AM (#13539246)
Wholeheartedly agree.

Incidents are inevitable and it's important to have a proper RCA/Service-Disruption process in place to handle those.

As mentioned on the other thread, maybe Gitlab doesn't have enough operational/SRE expertise in-house yet, but that was the case in every fast-growing company I've worked for last decade.

Re:'Check Your Backups Work' Day by tawayway on Wednesday February 01, 2017 @02:35AM (#13539054)
> Imagine if you're the CEO of Gitlab and seeing this right now

I kind of hope the CEO of Gitlab isn't reading HN right now

Re:'Check Your Backups Work' Day by ocdtrekkie on Wednesday February 01, 2017 @04:20AM (#13539463)
If he's getting some much needed sleep right now, he'll probably read it tomorrow. The CEO of GitLab is really active on HN, and a pretty classy guy.
Re:'Check Your Backups Work' Day by sytse on Wednesday February 01, 2017 @05:59AM (#13539786)
Thanks. Just landed in Europe for Git Merge. It is heartwarming to read some of the comments here. We realize that we only get this leniency once and we'll learn from this and communicate our lessons in a few days from now.
Re:'Check Your Backups Work' Day by harshreality on Wednesday February 01, 2017 @09:17AM (#13540833)
The lesson here has been learned over and over again, painfully.

For every backup system you have, test restores, from scratch, periodically. The more critical the data is to your business, the more frequently and more automated you want those backup checks.

Of course you also want procedures to try to prevent tired admins from deleting production databases. To the greatest degree possible, implement systems to prevent manual tampering with production data; often there's an alternative. But databases can get broken or corrupt without admin interference, so preventing manual database removal or corruption is not an ultimate solution.

Re:'Check Your Backups Work' Day by erikbye on Wednesday February 01, 2017 @09:55AM (#13541140)
Why is it you (GitLab) and every other company has to learn from your own mistakes again and again instead of learning from others? Just a cursory glance at a few log files would have told you that your backups are not happening. Nevermind verifying actual backups...

Do you have DBAs? Are they completely inept at their job? Don't answer.

Re:'Check Your Backups Work' Day by vegabook on Wednesday February 01, 2017 @01:11PM (#13543277)
Yours is an entirely appropriate response. While I appreciate the gushing solidarity in the rest of this thread, non working backups really is an elementary IT error, accurately attributable to incompetence.
Re:'Check Your Backups Work' Day by ocdtrekkie on Wednesday February 01, 2017 @10:29AM (#13541407)
Hindsight is always 20/20. Berating people who now KNOW mistakes were made accomplishes nothing.
Re:'Check Your Backups Work' Day by erikbye on Wednesday February 01, 2017 @12:29PM (#13542768)
Backup is elementary. It should not need to be learned nor manifest itself as a hindsight revelation. Frankly GitLab seems more and more like a mom and pop shop that learned Rails over a weekend. They did not even know if they had functioning backups before shit hit the fan.
Re:'Check Your Backups Work' Day by AsyncAwait on Wednesday February 01, 2017 @03:05PM (#13544525)
I bet you're making as successful of a software as they are. Don't answer...
Re:'Check Your Backups Work' Day by tawayway on Wednesday February 01, 2017 @06:43AM (#13539925)
I didn't mean as a slight against him, just kidding :)
Re:'Check Your Backups Work' Day by hrrsn on Wednesday February 01, 2017 @03:33AM (#13539289)
Re:'Check Your Backups Work' Day by marcosdumay on Wednesday February 01, 2017 @09:00AM (#13540721)
> We should probably treat this issue as something more like a disease like high blood pressure, namely, you don't know you have it, but it is probably doing irreparable damage to your internal organs.

That's why we need awareness days.

Re:'Check Your Backups Work' Day by evilDagmar on Wednesday February 01, 2017 @01:21PM (#13543354)
Precisely this.

Things that aren't tested can pretty much be counted on to fail a non-trivial percentage of the time. If it's going to be business critical, then it needs to be tested. (Lesson hopefully learned here)

By the same token, things which aren't monitored can also be counted upon to fail a non-trivial percentage of the time and even worse, go unnoticed. (Another teachable point here)

...but people being what they are tend to learn these things the hard way unless we've got concrete, real-world incidents like this for them to learn from.

Re:'Check Your Backups Work' Day by nicky0 on Wednesday February 01, 2017 @05:33AM (#13539676)
This page did a lot to raise my awareness of my own inadequate backup situation. Any hurt feeling of the CEO caused by this page will be outweighed by the greater good of the message being spread.
Re:'Check Your Backups Work' Day by dspillett on Wednesday February 01, 2017 @03:36AM (#13539301)
> even then it could still just stop working one day

This is where automated testing helps. My mail server has a sister VM out in the wild that once a day picks up the latest backup from the offsite-online backups and restores it, sending me a copy of the last message received according to the data in that backup. If I don't get the message, restoring the backup failed. If the message looks too old then making or transferring the backup failed.

My source control services and static web servers do something similar. None of the shadow copies are available to the world, though I can see them via VPN to perform manual check occasionally and if something nasty happens they are only a few firewall and routing rules away from being used as DR sites (they are slower as in their normal just-testing-the-backups operation they don't need nearly the same resources as the live copies, but slow is better than no!).

This won't catch everything of course, but it catches many things that not doing it would not. The time spent maintaining the automation (which itself could have faults of course) is time well spent if done intelligently. For a system as large in scale as GitLabs then a full restore daily is probably not practical so a more selective heuristic will need to be chosen if you are operating at such a scale. My arrangement still needs some manual checking and sometimes I'm too busy or just forget, so again it isn't perfect, but the risk of making it more clever and inviting failure that way is at this point worse than the risk of my being lazy at exactly the wrong time.

One thing my arrangement doesn't test is point-in-time restores (because sometimes the problem happened last week, so last night's backup is no use) but there is a limit to how much you can practically do.

> The problem of restoring non-existing backups should be treated as a more serious problem in our industry

It is by people that care about it, but not enough people care, and too many people see the resources needed to get it right as an expense rather than an investment for future mental health.

It isn't just non-existent backups. Any backup arrangement could be subject to corruption either through hardware fault, process fault, or deliberate action (the old "they hacked us and took out our backups too" - I really must get around to publishing my notes on soft-offline backups...).

> Let's identify the diseases of this sort in our industry

Apathy mainly.

The people who care most are either naturally paranoid (like me), have lost important data at some point in the past so know the feeling first hand (thankfully not me, though in part to having a backup strategy that worked) or have had to have the difficult conversation with another party (sorry, I can't magic your data back for you, it really is gone) and watch the pitiful expressions as they beg for the impossible.

The only way to enforce the correct due diligence is to make someone responsible for it, it is more a management problem than a technical one because the technical approaches needed pretty much all exist and for the most part are well studies and documented.

Of course to an extent you have to accept reasonable risks. It is usually not practical to do everything that could be done, and understandable human error always needs to be accounted for as do "acts of Murphy". But someone needs to be responsible for deciding what sort of risk to take (by not doing something, or doing something less ideal) rather than them just being taken by general inaction.

Re:'Check Your Backups Work' Day by cuu508 on Wednesday February 01, 2017 @05:57AM (#13539780)
> picks up the latest backup from the offsite-online backups and restores it, sending me a copy of the last message received according to the data in that backup.

This is sensible, but one problem with this is developing "blindness" for messages you receive every day. For some recurring tasks you can automate a bit further. Instead of receiving a success message every day, receive a failure message the first day there's an absence of success message. A number of tools and services exist for setting this up, one is linked in my HN profile (shameless plug ;-)

Re:'Check Your Backups Work' Day by dspillett on Wednesday February 01, 2017 @12:58PM (#13543125)
> This is sensible, but one problem with this is developing "blindness" for messages you receive every day.

This can be an issue, I do get lazy about checking them when I'm busy.

The next step will be to automate checking them a bit more, rather than stopping the positive messages. A simple script that for the mail example logs in via POP/IMAP, checks for the last notification and checks the relevant timestamps. Similar for other services (is the last commit in the repo from more than 24 hours ago?). Then I get a simple "all OK" or not. I still have to run the script, perhaps hooking it to CGI and setting it to my browser home page to further remove my laziness from the equation, but I don't want to just be told when something is wrong as I'll never really trust that something going wrong won't block warning messages - I want to make checking as easy as possible though.

I may play with your service and add it as a secondary set of checks though!

Re:'Check Your Backups Work' Day by marcosdumay on Wednesday February 01, 2017 @09:07AM (#13540758)
> This is where automated testing helps.

Now that I'm developing email stuff I get all the time the existential crisis of "how to I make sure my testing and alerting infrastructure is working?"

Really, how can you be sure your restoration tests are running correctly and their messages get all the way to you?

I think I'll add periodic positive messages for my restoration procedures. Stuff like (if success and day % 23 == 0 then email_something). Still doesn't guarantee the test is correct.

Re:'Check Your Backups Work' Day by dspillett on Wednesday February 01, 2017 @12:53PM (#13543051)
> Really, how can you be sure your restoration tests are running correctly and their messages get all the way to you?

I get a daily message, so if I know if things aren't getting sent or getting through. I've been wary of setting up anything that only sends problem messages because regularly getting the "all OK" messages proves that at least that part of the infrastructure is working.

Re:'Check Your Backups Work' Day by marcosdumay on Wednesday February 01, 2017 @01:25PM (#13543387)
The problem with that is when you start getting too many "all OK" messages.

Getting a message must be mostly a surprise. One daily message is OK for me, but if so it may be good to tell about more than a backup. A daily digest of "everything is up and running" may indeed be something very nice to have.

And how do you ensure a team will always have someone surprised not to get a daily message? Maybe sending for may people, or requiring some acknowledge, and creating a warning over the warning channel if there isn't one. (And you certainly aren't going to send those positive messages over the warning channel, because it requires a completely different kind of action.)

Re:'Check Your Backups Work' Day by dspillett on Thursday February 02, 2017 @04:08AM (#13549153)
That is why I'm thinking of scripting up something to scan the status messages and present a list (in the console or on a web page), colour highlighted (normal for info only, green for all OK, red for error or missed message, big red bold (flashing?) for an issue still not resolved from the previous day. That automates checking but I've still got the individual updates in case that fails. Maybe I'll make the output of this my homepage and/or console login banner.

> And how do you ensure a team will always have someone surprised not to get a daily message?

For a team you have a management problem not a technical one! Somebody needs to be responsible for it in the end, plain and simple.

On a less authoritarian note a technical helper might perhaps be to have a screen, always on, showing a dashboard of statuses, where everyone can see it? Make it beep incessantly when a new warning arrives until someone acknowledges it. If you acknowledge a message either deal with it (if you can) or notify whoever needs to be told so they can take action.

People will still sometimes ignore or miss the warnings. Nothing and no one is perfect.

But I'm only dealing with my own collection of personal data and projects here so it isn't that scale of problem - at work I used to be responsible for infrastructure as well as my actual job but we no longer operate at a scale where that is at all practical so I have to trust someone else is dealing with it (though I'm not that trusting I do sometimes take time out to check things myself where I have access).

Re:'Check Your Backups Work' Day by problems on Wednesday February 01, 2017 @11:31AM (#13542098)
> This is where automated testing helps. My mail server has a sister VM out in the wild that once a day picks up the latest backup from the offsite-online backups and restores it, sending me a copy of the last message received according to the data in that backup. If I don't get the message, restoring the backup failed. If the message looks too old then making or transferring the backup failed.

That's awesome. I've always tested my backups by having shitty, cheap servers so bad that restoring from backup happens about once every few months.

Going to an automated restoration test is a great idea, though also a lot of work for most people.

Just checking, manually or automatically that your backups are occurring and are of a reasonable size is probably sufficient for most operations and would have caught most if not every case in the GitLab instance.

Re:'Check Your Backups Work' Day by yeukhon on Wednesday February 01, 2017 @02:17AM (#13538985)
I think this is a big slap to company when they need to talk to their enterprise customers. I am not sure how we can really prevent this from happening by implementing an industry standard.
Re:'Check Your Backups Work' Day by cyberferret on Wednesday February 01, 2017 @02:33AM (#13539047)
You know, I remember reading years ago that during the launch preparation for Apollo 16(?), they did a routine pressure test of the Command Module atop the rocket a few days before launch. The technician in charge made the simple error of forgetting to open a pressure release valve during the test which lead to an overpressurisation of the CM causing significant damage, including separation of the heat shield.

The ENTIRE Saturn 5 rocket had to be wheeled back to the hangar and the CM dismantled and rebuilt, resulting in a month long delay in the launch.

When the Apollo launchpad manager was asked if he had fired the technician in question, then answer was allegedly "Nope. He is the one guy on the next launch team that I know will NEVER make the same mistake again."

I am willing to bet that Gitlab is now a company that will never slacken off their backup checking in the future.

Re:'Check Your Backups Work' Day by hueving on Wednesday February 01, 2017 @03:29AM (#13539278)
>When the Apollo launchpad manager was asked if he had fired the technician in question, then answer was allegedly "Nope. He is the one guy on the next launch team that I know will NEVER make the same mistake again."

This same general story appears in different forms with million dollar trading errors, etc. But I have to wonder if it's really that good of a lesson. If you truly take it to heart, you could potentially keep people on the team that are legitimately incompetent which could result in another catastrophic failure.

Re:'Check Your Backups Work' Day by safeaim on Wednesday February 01, 2017 @04:03AM (#13539399)
And if one starts applying your principle at a workplace, you end up with the whole company being afraid of doing anything at all, to avoid being fired.
Re:'Check Your Backups Work' Day by hueving on Wednesday February 01, 2017 @03:53PM (#13545031)
No, there is a level of competency where once you make mistakes below that, firing is the right move.

If a surgeon keeps killing patients because he keeps forgetting to wash his hands, then he needs to be fired.

If a developer skips all company policies and deploys directly to production without a good reason, then he needs to be fired.

There are reasonable mistakes, then there are errors resulting from wreckless actions indicative of a larger problem with the person's view towards their work.

Re:'Check Your Backups Work' Day by ocdtrekkie on Wednesday February 01, 2017 @04:22AM (#13539473)
It is not hard to distinguish between someone who makes a rare, but totally understandable simple mistake, and someone who regularly screws up significantly more often than everyone else. Being tolerant of mistakes makes you a good employer. Being tolerant of regular incompetence makes you a bad one.
Re:'Check Your Backups Work' Day by nicky0 on Wednesday February 01, 2017 @05:37AM (#13539689)
Make one mistake, it's an expensive training lesson.

Make the same mistake again, you get fired.

Re:'Check Your Backups Work' Day by bluGill on Wednesday February 01, 2017 @11:08AM (#13541806)
That is the wrong question. The real question is what did they do to ensure that this mistake cannot be made again by anybody. In the form this variation is in, the real question is what changes were made to the design so that the system cannot be over pressurized in that way by mistake.
Re:'Check Your Backups Work' Day by cyberferret on Wednesday February 01, 2017 @06:19PM (#13546441)
Sometimes you can put in all the checks and balances you wish, but humans will just make a, well, human mistake.

All commercial aircraft have checklists in place, and a two person cross checking system in the cockpit, as well as mechanical means to detect potential problems - but aircraft still every now and then land with their gear still up etc.

Does it make economic sense for an organisation that has invested possibly millions of dollars in training a pilot to immediately sack him/her for a costly mistake like this? Sure, disciplinary action and possible demotion within the ranks is a given, but will you get rid of the one person who will be almost fanatical about never landing with the gear up again?

If they consistently make technical mistake and are sloppy in their airmanship, then sure, fire away. But it is going to be pretty much impossible to design a 'system' that can prevent human errors from creeping in.

Re:'Check Your Backups Work' Day by AsyncAwait on Wednesday February 01, 2017 @01:59PM (#13543753)
Indeed, I just started planning for a side project to solve this by automating as much of the backup sanity checking procedure as possible.
Re:'Check Your Backups Work' Day by hvidgaard on Wednesday February 01, 2017 @05:11AM (#13539615)
Is it too much to ask for a few days dedicated to this? I mean, pretent that your critical infastructure goes up in smoke - can you recover, and how quickly? For most companies it simply means that you try to restore the machines from your backup. You can do this as everything else continues as normal.
Re:'Check Your Backups Work' Day by elastic_church on Wednesday February 01, 2017 @01:38PM (#13543511)
oh I thought GitLab was testing because of this day.