Posts Tagged ‘ data recovery ’

Last Resort Data Recovery: The Wayback Machine

Monday, October 1st, 2007

The Wayback MachineYesterday, I discussed a technique to recover data if your database has gone <skrewed>poof</skrewed> using Google’s cached content. There’s another technique that has saved my bacon more than once: The Internet Archive‘s Wayback Machine.

I once ran into a situation where the data on a new client’s server was corrupted, and there were no backups available. The graphics were jumbled or missing altogether, and the original artist was missing in action. Without the original source files, or any data backup to speak of, my client was pretty much pooched. And because the site had been in this state for quite some time, Google had cached the corrupted content. What to do? Visit the Wayback Machine, that’s what.

If you aren’t familiar with the Internet Archive, it is a non-profit that has been quietly taking periodic snapshots of the Internet–yes, the entire Internet–since 1996. Unless you have been one of the idiots who have requested that the IA stop
“stealing” your content, images of your site are probably in the Archive.

The Wayback Machine's Search Results

To use this technique, simply type your URL into the Wayback Machine’s search tool. You’ll get a list of snapshots in return that will, in most cases, date back to the birth of your site. Clicking on one of these snapshots should reveal a navigable (and, hence, content-extractable) version of your site as it appeared on that day.

In my case, I was able to find most of the images in an uncorrupted state. Simply by saving the graphics directly from the browser into my client’s site, I was able to reconstruct the site and get my client back on the web.

Sphere: Related Content

Last Resort Data Recovery: Google’s Cached Content

Sunday, September 30th, 2007

Catastrophic Data loss. It happens to the best of us. But thanks to the Power of the Interwebs, there really is no such thing as a total data loss. If you’re careful and resourceful, you can recover from even the worst data loss.

The Cobbler’s Kids Have No Shoes

On Friday night, I discovered something was very wrong with my site, including this blog. Long story short, despite my paranoia about backing up my data and making frequent archives of my client’s sites, I’m less vigilant about my own sites. To my horror, I found that the data for my very own site, including this blog, had reverted back to March. Meaning every post I had made to this blog for the past 6 months was just gone.

So how does one recover from such a disaster? This is where Google’s cached content comes in handy.

Google’s Cached Content

I was able to do a search for my site using Google’s “site:[sitename]” technique. Enter site:stringfoo.com by itself, and I get every single page that’s indexed by Google.

Google's Cached Content

By clicking on the Cached link, I was able to bring up an archived copy of my site’s pages. Using this technique, I was able to find WordPress’ monthly archive pages, from which I was able to retrieve my post excerpts and titles. Using the titles, I was able to find the full articles. One by one, I was able to recover the posts with relative–if not tedious–ease.

While it certainly is not fun, it is a method of last resort to recover from a catastrophic data loss.

Sphere: Related Content

Tip: Creating Test Users

Friday, June 22nd, 2007

I recently had a need to create a ton of fake users to test a system I’m building for a client. This required more than your average “tuser1?¢‚Ǩ¬? type one-offs. I need to stress the system, so I dusted off an old post over on the most excellent Signal vs. Noise blog written by the 37 Signals guys who recently went through a similar need when building their Highrise contact manager. A Google search and some good, old fashioned hunting revealed the post I was looking for.

For demo purposes, we’ve had to populate Highrise with a bunch of fake people. Here are some of the sites we used to save time and increase randomness while creating these make-believe contacts:

The Random Name Generator pulls first and last names from a couple of genealogy sites. Some fun ones that turned up: Garfield Morland, Juniper Pinney, Keaton Dimsdale, and Seymour Zeal.

A search for “John Smith” at whitepages.com provides addresses and phone numbers (we change the street and phone numbers by a couple of digits).

Plambeck.org has a company name generator that serves up choices like Sems Research, Cadridium, Nated Design, etc. 2robots.com also offers a Random Business Name Generator.

For job titles, The Economic Research institute has a huge list. And there’s also GigantaMegaCorp’s Job Title Generator which spits out random ones like Inter Purchasing Planner, Senior Engineering Associate, and Foreign Information Processor.

[via Making Random Contacts by Matt Linderman]

I found the White Pages method unusable for bulk-applications, so I turned up an ancient app for The Windows called RandomData 2.3 by Geoff Phillips. The trial version cranked out fake addresses like nobody’s business and I was off to the races.

I’ll also throw in some custom PHP functions for good measure:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function generateFakeIP()
{

    return rand(12,97).'.'.rand(1,255).'.'.rand(0,255).'.'.rand(1,255);
}

function genFakeEmail($username,$company)
{

    $retStr = strtolower($username.'@'.$company);
    $retStr = str_replace(' ?¢‚ǨÀú,",$retStr);

    $domain = array('com','com','com','com','net','edu','org');

    $thisDomain = array_rand($domain);

    $retStr .= ?¢‚ǨÀú.'.$domain[$thisDomain];

    return $retStr;

}

function genPhoneNums()
{

    $parenSet = array(array('(',') ?¢‚ǨÀú,'-'),
                      array('(',') ?¢‚ǨÀú,'-'),
                      array('(',') ?¢‚ǨÀú,'-'),
                      array('(',') ?¢‚ǨÀú,'-'),
                                        array(",' ?¢‚ǨÀú,'-'),
                                        array(",' ?¢‚ǨÀú,'-'),
                                        array(",","),
                                        array(",'.','.'),
                                        array(",'.','.'),
                                        array(",'.','.'));

    $whichArr = array_rand($parenSet);
    $punctSet = $parenSet[$whichArr];

    $thisPhoneNum  = $punctSet[0];
    $thisPhoneNum .= getRandNums(3, false);
    $thisPhoneNum .= $punctSet[1];
    $thisPhoneNum .= getRandNums(3, true);
    $thisPhoneNum .= $punctSet[2];

    $thisCellNum   = $thisPhoneNum;

    $thisPhoneNum .= getRandNums(4, true);
    $thisCellNum  .= getRandNums(4, true);

    return array($thisPhoneNum, $thisCellNum);

}

function getRandNums($charCount, $canBeZero=true)
{
    $retStr = ";
    for($i=0; $i<$charCount; $i++)
    {
        if($canBeZero && $i==0)
        {
            $retStr .= rand(0,9);
        } else {
            $retStr .= rand(1,9);
        }
    }

    return $retStr;
}


Enjoy!

Sphere: Related Content

Review: Path Finder for OS X

Friday, June 22nd, 2007

Review: Path Finder for OS X

PathfinderIf you’re an experienced Mac user, you have no doubt wanted to pull your hair out over the inadequacies of the Finder. I mean, clicking through hierarchical folders is so 20th century.

This is where QuickSilver (which may rank as the greatest “how did I ever live without this app?”¬ù app ever. (If you haven’t experienced QuickSilver, run, don’t walk, to Blacktree.com and download a free copy immediately. I’ll wait…Done? Good. Welcome to The Clubb.)

Experienced QuickSilver users already know the joy of rarely having to hunt and click for a file. (In my mind, Apple is seriously missing the boat by failing to integrate QuickSilver as-is directly into Leopard. However, that’s a post for another day.) There are rare occasions, however, when one must wander deep into the jungle of the Finder. This is where Path Finder comes in.

Path Finder is ostensibly a Finder replacement, although I don’t recommend this all-or-nothing approach. At its most basic, Path Finder can pretty much look and act just like any Finder window. But you have to try really hard to make it this simple. With a few clicks and a few minutes of exploration, you realize that Path Finder does far more than the Finder ever does.

Things I like about Path Finder:

* The “Drag Stack.”¬ù This alone is worth the price of admission. The Drag Stack is a handy little holding bin that holds any number of files from any number of sources. You can then act upon these en masse or one at a time once you navigate to your destination.
* The Breadcrumb Bar lets you traverse the entire path your selected file or folder
* Tabs. My god, how did we ever live without these? Just like Firefox, you can open separate tabs that allow you to hop from folder to folder with ease.
* Integrated file commands that allow you do act upon a selected file with ease. Want to compress and email a folder? Take your choice of compression algorithms.
* Taps into the power of OS X. Your stock Mac does a good job of hiding its Unix underpinnings, but Path Finder exposes the power of Unix with an integrated terminal, scripting, and any number of tools and services.

Pathfinder

Path Finder is not a perfect app. Far from it. For one, by exposing the innards of your Mac, it’s very technical. This means that Path Finder is not for everyone.

It’s also an acquired taste, even for power users. I, for one, had a difficult time getting used to switching to the app instead of just popping out to the desktop.

For another, it boasts a UI that only a Cocoa developer could love. Every edge except the top one has a pop-out window making the Swiss Army knife analogy even more apt. To make room for all the windows and features, the designers to using tiny icons and microscopic text. You can enlarge these, of course, but out of the box, Path Finder may very well make your eyes bleed.

Another ding against Path Finder is that it’s an app. This may sound strange, but I would expect a Finder replacement to live at a level of integration deeper than an app. So to use Path Finder, you have to switch to it like any other full app. For instance, it would be handy if F11 revealed Path Finder instead of the desktop. I would prefer to see Path Finder embedded in the system to the extent that QuickSilver is, meaning you can get at it from any number of directions and it’s always there when you need it. To be fair, it’s not strictly true that Path Finder doesn’t have system-level roots, but for the most part it works and behaves like a high-level app.

On the whole, however, Path Finder is an app to be appreciated. While I’m not as passionate about Path Finder as I am QuickSilver, I recommend Path Finder to power users who are frustrated by the shortcomings of the Finder.

Path Finder is $39.95 but comes with a fully-functional 30-day trial. Download it from CocoaTech’s web site.

Sphere: Related Content