All hail MySQL backups
December 15th, 2007
We went through a nightmare today morning 11 AM. While deleting a few invalid entries from our data, we accidentally wiped our User table! Yup! clean slate! All our users since we started gone blank!! We take backups of our database three times everyday, and the last backup from 10 AM had data for all but 2 users. We’re back to normal now, but unfortunately we don’t have any data on those two users now. Our apologies to them, hope they read this and come back again :).
Lesson learnt – no matter how much RAID you have, how many MySql slaves you have, always, always back up your DB. We keep backup copies of our DB for 3 times a day for last 7 days, 1 time a week for last 4 weeks, and monthly backups. We don’t have transaction logging for InnoDB turned on though, could that have saved the day in case of such accidental updates? Need to check that.
Entry Filed under: Tech
5 Comments Add your own
1. Gaurav | December 17th, 2007 at 2:08 pm
This sounds familiar. Was it a missing ‘WHERE’ clause? Didn’t you have any foreign key restraints to deletion of user records, so that there are no orphans left if a user record is deleted?
2. Animesh | December 18th, 2007 at 1:01 pm
Yup, the where clause did us in :p
But guess what, the foreign key constraints wouldn’t have saved us either, I wasn’t deleting anything, just updating. I’m not much of a fan of applying these constraints in the DB though, but you’re right they might save accidents from happening.
We usually do everything from our own admin GUI, except for the ocassional esoteric query/update that must be run through the mysql command prompt. And I always keep telling myself not to doze off while doing something there, still it just had to happen!!
3. Aparna & Girish | December 29th, 2007 at 5:10 am
To all the folks at iTasveer:
Just wanted to tell you guys how much the two of us love this concept. Our folks back home (in India) wanted a full-blown pic of the two of us and we were glad we could use your service. It’s so timely and convenient!! We also appreciate the fact that you do your business in Rupees, though we are confident that things would change once you globalize your Product!
Oh btw, we are hoping the photos would reach our homes on time (before New Years!)…But we are quite confident that they would be delivered on time. Won’t they?
Anyway, great work!
Aparna & Girish
p.s. We also loved your UI. It’s neat and unambiguous. But think you could afford to do some more work on previewing and cropping the photo…(You could borrow ideas from http://www.epassportphoto.com/). Working the size/aspect ratio/proportion with epassport is very easy!!
p.p.s. Yeah, by now, you guys must have realized what a photo-savvy family we are :-)
4. Ashish | December 29th, 2007 at 8:17 pm
Hi Aparna, Girish,
Thanks a lot for the appreciation. It means a lot to us – especially that you took the time and wrote a heartfelt review. Will definitely check out epassportphoto.com and see if we can get any ideas on improving our UI.
5. Nel | November 8th, 2008 at 5:15 pm
Whao…if your backups were less frequent,it would be really brutal…
Non-expiring coupon codes for GoDaddy.com, they work with renewals also. Just enter them at checkout.
CDE3 – .COM for $7.45 – Save $2
CDE1 – 10% off any order
CDE2 – $5 off any order $30 or more
brillantdeals.in/godaddy-promo-codes/
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Subscribe to the comments via RSS Feed