Gitlab accidentally deleted production data
twitter.com
twitter.com
This is the best communicated outage that I can remember seeing.
a) YP thinks that perhaps pg_basebackup is being super pedantic about there being an empty data directory, decides to remove the directory. After a second or two he notices he ran it on db1.cluster.gitlab.com, instead of db2.cluster.gitlab.com
b) YP terminates the removal, but it’s too late. Of around 300 GB only about 4.5 GB is left
Nightmare material. Are there any known cases of DBAs or developers suffering a heart attack due to this sort of thing?
Best of luck though and kudos for the transparency!
Always test yur backups automatically and fail the backup job if the restore fails, because DR/BCP is no guden without viable customer data.