Wednesday, April 19, 2006

How to recover quickly from lost blog code

...and only suffer mild side effects.

While I was editing my template last night I inadvertently lost all my sidebar html and code. Typically I didn't have a back-up. It took me a few hours of kicking myself to realise that I do have many copies in Google's cache - which is why I am posting - hopefully to save others time and bruised thighs (don't kick youself if you know karate). No worries mate, she'll be right. I searched for Google for a recent pre-disaster post and clicked on the cached option. There it was, with search terms highlighted. I converted to source code, and easily found my sidebar text. It was useful that I had documented the code with comments, and so does Blogger. I cut and paste into my Blogger template, and I am back to normal.

Almost normal. My original Google search terms are highlighted wherever they appear in the sidebar, and my most recent posts were from the month old source code, over which I cut and pasted up-to-date code. My scripts worked fine.

I am leaving those sidebar terms highlighted as a reminder to back up my blog locally. A lucky escape.

Tags: , , , , ,

1 comment:

hcg said...

I hope you have a nice day! Very good article, well written and very thought out. I am looking forward to reading more of your posts in the future.