The situation: You’ve just spent the last few hours writing a post for your blog or newsletter, using the editor built into your blogging or mailing platform, which you access inside of a web browser. You go to hit Publish, and you get prompted to login (because it auto-logged you out for some reason). Or you see an error message, maybe something like, We’re sorry, we couldn’t process or request. Or you see a blank web page.
You login again (or go back) and discover that all that’s left of your blog post or newsletter is an incomplete fragment…. or worse, nothing! You curse your blogging tool and wonder if there is anything you can do to retrieve your lost draft.
As it so happens, there is.
The solution: Assuming your data is not saved in a cookie or in a cache file, and can’t be retrieved using a tool like Lazarus Form Recovery (which you MUST install if you are a Firefox or Chromium user, after you are done following the steps outlined below), your only recourse is to dump the browser’s memory and search for the draft.
I have successfully recovered a draft using this method (which was pioneered by Thomas Strömberg) more than once, either when Lazarus failed me, or I was running a browser that did not have Lazarus installed. So can you… but only if you are capable of reading carefully and following directions!
This tutorial assumes you are running Windows, because that’s the operating system most people have on their desktop or laptop.
Prerequisite: For this method to work, the browser you were/are working in needs to be kept open and undisturbed. Do NOT close your browser and do NOT close the browser tab your data was lost in! Leave it open. Don’t touch it. Open a different browser and proceed with these instructions in that browser.
Ready? Let’s go!
- Determine whether the browser you were working in is multi-process or single-process. If it was Internet Explorer 8 or Chromium (i.e. the spyware-infested Google Chrome – yuck, or ChromePlus – free of Google’s spyware), then the browser is multi-process. If it was Firefox or a previous version of Internet Explorer, the browser is single-process. If you use some other browser, search for the answer on Bing.
- If you use a single-process browser, proceed to the next step. If you were using a multi-process browser like IE8, maximize that browser now and begin counting how many tabs are currently open, beginning at left. Stop counting when you get to the tab you were working in, where your draft was eaten. Write this number down.
- Next you need to download two tools: pmdump and strings. These tools will permit you to dump the browser’s memory into a text file for examination so you can look for the contents of that lost draft. Go here to download pmdump. Then, go here to download the Sysinternals strings utility. Download these files to your Desktop.
- Click the Start button. Choose “Run” and type “cmd”, then hit Enter. (Vista/Win7 users: Just type “cmd” into your search box and hit Enter).
- A black screen will appear and will display a copyright message, then it will show a command prompt, like this:
C:Documents and SettingsYour Username>
- Navigate to the folder where you downloaded pmdump and strings (should be Desktop), by typing the following and hitting Enter:
- Now it should say
C:Documents and SettingsYour UsernameDesktop>Type the following and hit Enter:
- You should see a list of currently running processes ending in .exe with numbers to the left of them.
- Now it’s time to dump the memory. First, however, we have to narrow down which process contains that lost draft. (If you were using a single-process browser, skip to the next step). To do this, we’ll isolate all processes related to the browser. So, for instance:
pmdump -list | find "chrome"OR
pmdump -list | find "ieexplore"
Once you have executed this command (again, by hitting Enter), you’ll see a smaller list of processes. They will all have the same name, but different numbers preceding them. Start counting the number of processes, beginning at the top of the list. When you reach the number you wrote down earlier (of the tab you were working in), stop.
- Now write down the four-digit number of the line you’re on.
- To dump, type the following and hit enter, where “XXXX” is replaced by the number of the browser process. This command may take some time to run. Let it finish.
pmdump XXXX recoverdraft.dmp
- Now you’ll get rid of all the non-text data from the memory dump you just made using the strings utility. Type the following, hit Enter, and then be patient while it finishes:
strings recoverdraft.dmp > recoverdraft.txt
- Leave the command prompt window open.
- In the folder where you downloaded pmdump and strings, you should now see recoverdraft.dmp and recoverdraft.txt. Right click on recoverdraft.txt and choose Open With > WordPad. The file may take a while to open, so be patient. If you were using Firefox and had many tabs open, the file will be huge.
- When the file finishes loading (assuming WordPad doesn’t crash) hit Ctrl+F to open the search box. Type a unique phrase from your draft and hit enter. If all goes well, you’ll stumble across decently-sized fragments of your draft, or maybe even the draft in its near entirety. If you find nothing, try another phrase, and then another.
- If you don’t find any fragments at all after several tries, it could be that you dumped the wrong process. Go back to the command prompt window and verify which process you dumped.
- If you miscounted, dump the correct process.
- For multi-process browser users: If you didn’t miscount and suspect the list of processes top-to-bottom does not correlate with the tabs open in your browser left-to-right, try dumping and running strings on each one of them. Obviously, this could be time consuming, but trial and error usually is!
Ideally, after following the steps above, you’ll succeed in recovering most or all of your lost draft. If your draft has been separated into a great many fragments, piecing it all back together will be tough. You are more likely to encounter fragments if you were switching back and forth between writing and doing something else (like researching) while you were composing the draft. If all you were doing was typing your post or newsletter for an uninterrupted bloc of time, you are likely to find your draft mostly intact.
You can close your browser and the command prompt after you are all done, and have successfully recovered your draft… or given up 🙁
In the future, save yourself a lot of time by installing Lazarus Form Recovery. This add-on is available for Firefox and Chromium (if you want to use Chromium, I recommend ChromePlus, not the spyware-infested Google Chrome).
Lazarus securely saves all the data you type into forms, so in the event of a crash, disconnection, or other mishap, you can get your input back with just a couple clicks. Lazarus works more reliably in Firefox. It may not save your bacon if you’re a Chromium user, because it is still in early development.