Sunday, February 1, 1998

Recovering lost PalmPilot data

.FLYINGHEAD TECH SUPPORT INSIDER
.TITLE Recovering lost PalmPilot data
.AUTHOR Chris Brown
.DEPT
.SUMMARY It can happen to anyone. Data loss. Disaster. But it doesn’t have to ruin your day. PalmPilot support guru Chris Brown shows you how you can recover from virtually any PalmPilot data loss disaster.
Do you remember when the classic excuse for not turning your homework in on time was "the dog ate it?" When was the last time you used that line? Well, without the risk of showing your age, think of the last time your boss asked for a report that somehow slipped your mind. Hopefully you didn’t try to convince her that Fido ignored his Kibbles ‘n’ Bits to try the new taste of Paper ‘n’ Ink. Besides, unless you were planning to hand in something handwritten, she’d probably ask you to just print up another copy of the report off of your hard drive.

Forget using your pets for scapegoats. Blame technology! "The dog ate my homework" has now become "My hard drive crashed!" It’s a much more believable excuse these days. Chances are that it has already actually happened to you and anyone else who has ever worked on a computer for a good amount of time. Since it has probably also happened to your boss before, she’s much more likely to be sympathetic and spare you the flogging.

.CALLOUT You should not try to HotSync before you use the backup files.

Now here’s an excuse you should never, ever use: "My PalmPilot crashed and I didn’t realize it was due today!" That’s not to say that your PalmPilot device will never crash on you. As with any computer, it will probably hiccup sometime in your relationship. You might get away with this excuse if your boss has yet to be enlightened on HotSync technology, but you know better. If you are performing a HotSync regularly with your PalmPilot Desktop on your PC, you would still be able to see your To Do List and Date Book items just as they appear on your PalmPilot organizer. Not only that, but you would be able to synchronize and replace those items back onto your device with another HotSync. Performing a HotSync between your device and PalmPilot Desktop makes for a natural backup, of course. However, what if Murphy’s Law combines with your bad karma (for not doing your report in the first place and then lying about it) and strikes at the data shared between your PalmPilot device and PalmPilot Desktop software? It wouldn’t really make much sense to try to synchronize bad data to solve the problem, right?

Well, you may not know it, but while you are performing a HotSync, not only is the PalmPilot Desktop updating its copy of the PalmPilot device’s data, another "secret" backup of your data is being written in the background. You can use this backup and perform some transplant surgery in your file structure to get things back up and running again.

.H1 PalmPilot med school 101: desktop anatomy
If you’ve never peeked inside of the PILOT directory (or Pilot Desktop 1.0 folder on your Macintosh) on your hard drive, now may be a good time to get acquainted with its innards. If you had to perform surgery later, you should know the anatomy of your patient, right?

In the drive that you have installed your PalmPilot Desktop software, find the PILOT directory (or if you are a Mac user, Pilot Desktop 1.0 folder). When you open this directory, you should find a folder that has a name close to your user name. The usually looks like a combination of your last name, followed by your first initial. For example, my user name, Chris Brown, would be shortened to "BrownC".

This user name directory should contain several folders. The number of these will vary based on what applications you use with your PalmPilot organizer either loaded onto the device itself or run off of your PC. There are a few directories, however, that should always be included in your user name directory regardless of your version of Pilot Desktop or PalmPilot Desktop. Look for these folders: ADDRESS, DATEBOOK, MEMOPAD, TODO.

Inside of these folders, you will find files marked .BAK and .DAT. The names of these files correspond to the name of the directory they are found in, as well as each other. For example, you’ll be able to find DATEBOOK.BAK and DATEBOOK.DAT files inside of your DATEBOOK directory. Make sense? Take a look, you’ll know what I mean. Smart as you are, you can probably already guess that the DATEBOOK.DAT file contains the data that PalmPilot Desktop uses for the Date Book application, and the DATEBOOK.BAK file is the backup of this file.

When would you use these files? Well, if you find that the data on your PalmPilot organizer and PalmPilot Desktop have some weird inconsistencies or garbage that you know that you haven’t entered yourself, you might diagnose this as a case of corrupted data. This is a rare occurrence, so if you don’t know what I am talking about you’ve probably never seen it.

To illustrate, when I was looking for a friend’s address on my PalmPilot Professional Edition, I found a bunch of gobbledy-gook under his name and phone number. I didn’t even know the Graffiti strokes for some of the characters I saw, much less how to enter them with a keyboard on my PC. I was definitely suspicious. I checked PalmPilot Desktop on my PC, the record was different, but I wasn’t convinced that everything else was okay. When I kept getting a "fatal error" when I clicked the Edit button to correct the erroneous record, I knew something was wrong.

Another way a case of corrupted data may rear its ugly head is if you perform a HotSync and the connection suddenly drops for no good reason. You probably have data corruption that your HotSync Manager did not know how to resolve. If you’ve seen something like the above two examples, your data files may be candidates for a transplant, with your .BAK files as the donors.

.H1 Transplant surgery
The secret of restoring your data is catching the problem early. As soon as you notice the problem, do something about it. You don’t want it to be too late to completely cure the disease if it has already spread to your healthy backup files. It is for this reason that you should not try to HotSync before you use the backup files.

If you perform a HotSync before attempting to correct the problem, you may be overwriting your backups with the corrupted data! If you noticed the problem when your connection dropped while trying to HotSync in the first place, however, it may be a good idea to try it again. When you perform the HotSync this time, however, you should try to take notice when the connection was actually dropped.

When the HotSync Progress window pops up on your PC monitor, keep your eye on the status line and try to catch at which point the HotSync Manager stopped the synchronization. This will tell you what data file probably contains the corruption. For example, if you notice that the connection drops when the status line says "Synchronizing Address Book", the ADDRESS.DAT file probably has the corruption. You will also want to check the HotSync log to see where it ran into problems. To do this, launch PalmPilot Desktop and select View Log from the HotSync menu. Look at the last record for any suspicious entries made by the HotSync Manager reporting problems with synchronizing any of the applications. This will help you confirm which .DAT file to replace.

Similarly, if your PalmPilot organizer has some garbage like I described above, the data file for the application you are working in should probably be replaced with your backup. In my example, I was looking up Address Book information, so I would try replacing the ADDRESS.DAT file.

The first thing that you should do when substituting your files is to move (not copy) your .DAT files to a safe place. You can just create a new directory in your user name folder, call it something like OLDDAT and keep those files safe from being altered. They’ll be there just in case you need to replace them.

Next, simply rename your .BAK files so that they use the .DAT extension. For example, if I was replacing my Address Book data with my backup, I would rename the backup file from ADDRESS.BAK to ADDRESS.DAT. Do not touch any of the other files that may be in the same directory.

Launch PalmPilot Desktop. In the HotSync menu, select Custom. In the window that appears, select the application in which you are replacing the data and click the Change button. Select the option "Desktop overwrites PalmPilot". Click Ok, then the Done button.

Perform a HotSync. Not only will your PalmPilot Desktop software now be using the data from your backup file, but it will overwrite whatever bad data may be lurking on your PalmPilot device as well.

Now, considering that you caught the problem early enough and the backup files weren’t corrupted, you should be able to go on your merry way. You should be aware that the data that is now on your organizer and in PalmPilot Desktop reflects what has been synchronized at the time of your last successful HotSync, so anything you may have entered on your PC or on your PalmPilot device since that last synchronization will have been lost. If you perform a HotSync on a regular basis, however, you shouldn’t come up with too many lost entries.

To review:
.BEGIN_STEPS
.STEP Move your .DAT file(s) from their appropriate directories and place them in a new, safe directory.

.STEP Rename the corresponding .BAK file(s) so that they are now .DAT (ADDRESS.BAK would become ADDRESS.DAT).

.STEP Change your Custom HotSync option to "Desktop overwrites PalmPilot".

.STEP Perform a HotSync.

.STEP Have a cigar.
.END_STEPS

.H1 Preventive medicine
As easy as using your backup files in an emergency is, you really shouldn’t have to do it at all. In fact, I’ll tell you the easiest thing you can do right now to make managing your data a less dramatic event if something goes wrong. Make a periodic backup of your user name directory. Don’t worry about doing it very often, but the more often you do it, the better off you’ll be on a rainy day.

Simply find your user name directory in your PILOT or Pilot Desktop 1.0 folder and make a copy of the entire folder either elsewhere on your hard drive or on a completely separate disk (remember, hard drives like to crash too). I would recommend doing it as often as once a week, if you like. You should also do it anytime you have made any significant changes to your data, say, if you just came back from a convention with tons of new contact information that you would die without. Just make sure to perform a HotSync first before making your copy.

If you do run into a jam with your data sometime in the future, all you would have to do is:

.BEGIN_STEPS
.STEP Replace your user name directory in the PILOT or Pilot Desktop 1.0 folder with your backup user name directory.

.STEP As described in the section above, change your Custom HotSync option to "Desktop overwrites PalmPilot".

.STEP Perform a HotSync.

.STEP Cigar, anyone?
.END_STEPS

Don’t worry if you never have to use your backup user name directory. But just like having a fire extinguisher handy in the kitchen, you are better off in an emergency to have a backup in your keep.

.H1 PalmPilot acupuncture
Let’s go back to that little lie you told your boss about your PalmPilot device crashing. Okay, maybe it was true. Maybe something funny really did happen and all the button-pushing or Graffiti-scribbling in the world isn’t doing a thing for you. Did an application crash? Has your organizer "frozen" on you? Has it fallen asleep and won’t wake up? Is it just generally cranky? Well, a quick and safe thing that you can do is poke your PalmPilot in the back.

Acupuncture? No. It’s called a "soft reset". If you turn your PalmPilot organizer over, you will find a little hole labeled "RESET" located near the serial number. Unlike acupuncture, you do not want to stick anything sharp (like a needle) in the reset hole. Instead, use the official PalmPilot Reset Apparatus: take a paperclip from your desk drawer and un-bend it so that one end sticks out free. Using that end, insert it into the reset hole and gently press the button inside. When you do this, you should see the "Welcome to PalmPilot" screen.

A soft reset is called "soft" because all your data is safe after performing it. The soft reset has a not-so-nice cousin, however: the "hard reset". A hard reset will erase all the records and entries that you have made on your organizer, so don’t call it into the ring unless you aren’t successful with a soft reset. If you have performed a HotSync recently, you shouldn’t have much to worry about, but keep in mind that whatever was on your organizer after your last synchronization will be lost for good. To do a hard reset, simply hold down the power button while you perform a soft reset. If you see the Welcome to PalmPilot screen, you probably haven’t held down the power button long enough. Your screen should have a message asking you to press the "up" scroll button to erase all data. If you press any other button, it will simply go ahead with a soft reset.

After a hard reset, your PalmPilot will also lose your user information, so next time you perform a HotSync, make sure to choose the correct user name when asked. You will also lose any applications you have added to your PalmPilot device, so you will need to reload these as well.

A soft reset really does solve a lot of problems for you, so don’t be afraid to try it if your PalmPilot organizer throws a little fit that you otherwise can’t do anything about. A hard reset should only be used as a last resort, and only if you are confident you can retore your data after another HotSync (read: don’t do it unless you know what you’ll be losing).

Sorry to burst your bubble, but you should forget about using that excuse about your PalmPilot crashing on you. You’ll be better off blaming the dog because you now know what to do about your data problems. Of course, if you have a problem that you really can’t figure out by reading my scribbling above or by looking at our website at http://www.palmpilot.com, give us a call at 1-847-676-1441, and we’ll be happy to help you out with your PalmPilot support issue. You’re on your own dealing with your boss.

.BIO
.DISCUSS http://www.component-net.com/webx?13@@.ee6b863