Automate your database backups on MOSSO
March 21, 2009
Today I learned the hard way that your data isn’t always safe.
I created an Admin interface for one of my clients that basically manages an Image Gallery. The gallery allows for a Category and SubCategory structure.
I received a call at about 10:30am asking where all of his images were? After doing some investigating, my heart stopped, I found the bug.
I had a bug in my SubCategory_Delete proc that didn’t have the WHERE SubCategoryId = @SubCategoryId clause. When a user would delete a SubCategory it would delete all the photos in the image gallery instead of just the photos in that specific SubCategory.
My initial thought was to get the backup. Well it turns out backups aren’t created automatically. This is something you need to manual do when creating a database.
I was fortunate enough to have a great Customer Service rep, Sean Fox, that somehow managed to convince MOSSO’s IT team to create a backup for me from their disaster recovery backups. Thanks MOSSO.
So after first going to my client with my tail between my legs I was able to go back to him as a hero. “Your data has been saved!”
I’ve since put in place a backup plan for all of my databases hosted at MOSSO. I found this article in their Knowledge Base: http://help.mosso.com/article.php?id=346 for MSSql. There is one for MySql, http://help.mosso.com/article.php?id=356.
I modified it a bit by creating a console app that is scheduled nightly and ran on my server. This way only I can execute the backup.
My advice is to put this in place before you need it, not afterwards.
-
Categories
- asp.net (11)
- Blog (1)
- Business (5)
- Conferences (1)
- Errors (3)
- Portfolio (2)
- Reviews (2)
- SQL Server (3)
- Tips (1)
- Uncategorized (1)
- Web Development (13)
-
Archives