Wednesday, 18 May 2011

Recover lost page in Drupal

Did you ever lost a page, in Drupal CMS, without having a backup copy?

It happened to us yesterday.

While working on repeating and rather boring task of pasting a chunk of the same code in many existing pages, my co-worker made a mistake and deleted content of a very important page.

It took us some time to realize what exactly the problem was. Since it was the front page, we thought that the site was not working at all.

The only backup, unfortunately was some 20 days old.

I tried to find some solution googleing about it. First few results clearly explained that Drupal, by itself, does not have some kind of recycle bin. Even the worst fact was that the page was not deleted at all, just completely overrun by the wrong piece of replacement code :-/

Thanks to this post: we found the solution.

If your page has been online for some time, you can find it by google search, searching by it's url (to get it on top of results). The result has one link labeled "cached" and if you are lucky, cached page will be your exact version that got "lost".

1 comment:

  1. You might want to consider versioning
    Posted by cfox612 on May 18, 2011 at 7:53pm

    Drupal has it, just save each "revision" leaving yourself notes as to what you changed, and you can easily restore that way. Saves a lot of headache later on!

    Taken from: