Did you ever cancel by mistake a post on some website, only to find out that you had no other copy of it anywhere, not even in Google’s cache? I did. Here is how I recovered it.
About ten days ago I wrote, on another website of mine, a post titled “What seems missing from that agriculture summit”. Both this and that website are maintained with the Hugo static website CMS: I write posts as plain text files on my computer, run the hugo website generator, and (through a couple more steps not relevant here) both websites are created, and uploaded on the Web server as one set of static HTML pages, without any need for maintenance and no CMS attacks to worry about.
Due to a weird combination of lack of sleep and other errors, I canceled that particular post from my computer after I had ran hugo, but before making any backup of it. Since the post had been added to the website, I realized what I had done only a few days later. But since I had ran Hugo several other times in the meantime, to publish more posts, I had erased that post from the website too (because Hugo basically makes one “Web-formatted” copy of all and only the posts you have in a folder of your computer when you run it).
When I realized what I had done and how, I thought “OK I was dumb, but no problem! I will just insert the title of my post in Google, click on the “cached copy” link and get its whole text, ready to be copied and pasted into a new file in my computer. Right?
No! Because Google Cache…
Does not work that way. As Google itself says, If you click a link that says “Cached,” you’ll see the version of the site that Google stored. Since Google had (re)indexed my website after I had erased the post, all there was in its cache was an empty post with that title. My fault, obviously, but how to fix it? Here is how.
One sentence at a time
The solution is as tedious as it is simple. What I found out is that if a post is erased, Google will update its “cached copy” to match this fact, making it empty. But Google will still remember, somehow, each single paragraph of that post. Besides, whenever you ask it to search for a sentence, Google will show it in context, that is surrounded by the sentences immediately after and before it. This means that that if you remember just one sentence from that post, you can still recover its whole text, one paragraph, or one sentence, at a time. As these screenshots show, it is only a matter of patience:
See what I mean? I entered “I am wrong, and I will etc etc..” (in double quotes!) and Google showed me those words, and the following 30 or 40 ones. So I copied that text in a file on my computer, but also its last part (again inside double quotes) back into the Google form:
this showed me another piece of text, allowing me to repeat the same stupid trick until I recovered the whole text. Just note that I also added the “site:<website name” search operator, to be sure that Google only returned copies of my original post, not of any (maybe edited) copies or quotes that could be online elsewhere.