Special Edition Using Microsoft Windows XP Professional (3rd Edition)

Nobody plans to lose or corrupt an important file. But then again, no one I know gets up in the morning and plans to crash his car either. Things happen, though, and for all the same reasons you buy car insurance, you should also be taking all the necessary steps to safeguard all those bits and bytes that reside on your system's hard drive.

Windows Backup Program

Windows is installed with a backup utility that should meet the needs of most individual users. With it, you can back up folders or filesboth local and remoteto a Windows recognized tape device, to a removable storage device (JAZ drive, MO drive, Zip drive, and so on), or to a file on a local or remote drive. If Windows XP can read the file (FAT16, FAT32, or NTFS natively), then it can be backed up.

NOTE

Windows XP's Backup program is acceptable for an individual user's computer, but it's not really adequate for LAN or server backups because it can't fully back up remote computers. If you're setting up a LAN, you might look into more sophisticated programs, such as the server versions of ARCserve or BackupExec. If your computer is on a LAN, your system administrator might have a more sophisticated centralized backup system available to you.

NOTE

Windows XP offers versatile removable storage services used to manage groups of removable media (a.k.a. media pools). Windows keeps track of what media can be overwritten, which can be deleted, and which media need to be retired. However, in many situations, especially for individual users, managing media pools is too much work for too little benefit. For the most part, you can more than adequately manage your own media manually through proper labeling.

An easy to follow scheme for tape management (or any medium for that matter) is to have 5 or 6 tapes. Rotate each tape after each full backup (in many cases this occurs once a week). Keep track of the uses of each tape. For example, label the tapes "My Stuff 1/5", "…2/5", and so on. Then each time you insert the next tape, write the date on the label. Keep in mind that tape media usually are designed for 6 to 10 uses before they need to be replaced. You can use them dozens of times, but as the use numbers add up, the reliability of the recorded data, as well as the physical integrity of the tape itself, degrades. Once you've reached the reliable use lifetime (6 to 10) of a medium, replace it. By this process (one week full backup rotation with 5 tapes for 6 uses), you'll need to buy new tapes about every seven months.

If you'd like to learn more about media management, there is plenty of coverage in the Help and Support of Windows XP as well as in the Windows XP Resource Kit.

The first time backup is launched (Start, All Programs, Accessories, System Tools, Backup), the Backup or Restore Wizard is launched. The first page of this wizard has a check box which controls whether the wizard is launched every time. The wizard can be used to backup or restore files. These wizards offer few options; they mainly ask whether you want to back up or restore, what types of documents to manage (My Documents and settings only, everyone's documents and settings, or all data), and where to put the backup. If that's all you need, then you don't need me.

However, there is a lot more to explore in the Backup utility if you switch to Advanced Mode. You can do so by clicking on the link. Plus, you can choose to always open Backup in Advanced Mode by de-selecting the Always Start in Wizard Mode check box.

When you reach Advanced Mode, you'll actually be seeing the Backup utility proper (see Figure 29.12). I think it's humorous that Microsoft labeled using the utility directly "advanced." From the Welcome tab of the Backup utility, you can launch more advanced wizards which offer a broader range of activities and settings. There is a wizard for backing up, restoring, and Automated System Recovery (ASR).

Figure 29.12. The Welcome tab of the Backup program.

ASR is a two-part backup solution which creates a backup set that can be used to fully restore your system. It creates a boot floppy and a media set. The ASR backup can restore your system even if you can no longer boot into Windows XP or you replace your hard drive. Just boot with the floppy and follow the prompts to restore your entire system from the backup media.

NOTE

Emergency Repair Disks are a thing of the past. Windows XP does not offer a facility to create and ERD. In fact, the recovery and restoration tools included with Windows XP don't need an ERD. Instead, Windows XP uses other mechanisms to protect its Registry, SAM, and configuration settings. First, the Registry actively maintains its own backup copies. Second, the native backup utility can save System State. This includes the Registry and all essential system configuration settings. If your system is just damaged, the repair capabilities of Disaster Recovery are able to rebuild the system. In the case of a complete system loss, a full backup can restore your system. In either case, the ERD is no longer required.

In addition to the Welcome tab's wizards, there are three other tabs of control. The Backup tab is used to manually configure a backup operation. The Restore and Manage Media tab is used to manually configure a restore operation and perform basic media management tasks. The Schedule Jobs tab is used to view and alter scheduled backup jobs.

If you are completely new to backing up, use either default wizard or the advanced wizard to walk you through the process. You'll get the hang of it very quickly. If you are a backup veteran, I don't even need to tell you how to perform a backup.

The Backup tab's interface is very straightforward. Just mark the check box beside each item you want to include in the backup. Keep in mind that marking a parent box will automatically include all sub-folders and file contents. And don't forget to mark the System State check box to protect your Registry and system configuration.

Backups can be stored to tapes or files. The tape option is only available if you have a tape device installed locally. Otherwise, all other storage locations are accessible through the File option. Through the File option, you can define the destination path to a file on a local hard drive, on a Zip disk, on floppies, or even across the network to a network share.

TIP

Selecting the option to back up to a file is actually a blessing in disguise. Because many people don't have traditional backup devices such as DAT tapes or DLT drives, backing up to a file facilitates backup to other common removable media such as CD-Rs. Backing up your data in this manner is preferable to simply writing files to a CD-R. Normally, if you simply back up files and directories to your CD-R drive, you lose your permissions as well as make all the files read-only by virtue of the fact that they are backed up to read-only media. By backing up to a single file from Backup, you retain these settings and can restore with all of them intact. You can even compress this file before you write it to your CD-R by using your favorite zip program.

After you made your file selections and defined the destination, click the Start Backup button. This reveals the Backup Job Information dialog box (see Figure 29.13). From this dialog box, the following items can be configured:

  • Description

  • Append or overwrite/replace media

  • Allow only the owner and administrator access to the backup

  • Schedule the backup (via Schedule button)

  • Set Advanced options (via Advanced button)

  • Cancel backup (via Cancel button)

  • Start backup (via Start Backup button)

Figure 29.13. The Backup Job Information dialog box.

Scheduling a backup is not difficult; just follow the prompts. You'll need to save your backup selections, and then provide the username and password under which you want the backup job to execute. Once you are presented with the Scheduled Job Options dialog box, be sure to click the Properties button to define the schedule you need. A thorough discussion of the scheduling options is included later in this chapter.

The Advanced options include

  • Backup data in Remote Storage

    NOTE

    Remote Storage is an optimization mechanism where unused or infrequently accessed files are moved off to a remote storage location, such as a network share or a tape device. If the user requests a migrated file, it is automatically retrieved and returned to its original location, invisible to the user. Remote Storage is supported by Windows XP via NTFS. However, no details are included in Windows XP's Help system on how to configure it so you'll need to consult the Windows XP Resource Kit for details.

  • Verify data after backup

  • Compress data to save space

  • Include system protected files with System State

  • Disable volume snapshot

    NOTE

    A volume snapshot allows most open and locked files to be included in the backup. If this feature is disabled, open and locked files will most likely not be included in the backup.

  • Set backup type

There are five types of backup supported by Windows XP's Backup utility. It is a good idea to consider the different types of backups available before initiating your backup. As you probably know, the operating system provides a means for keeping track of which files have been changed since the last backupthe archive bit. Based on whether a file's archive bit is turned on or off, the backup program either backs it up or skips over it. Your job is to set the correct options so the Backup program is relative to this bit. You can find these options through the Advanced button as discussed or by opening the Tools, Options dialog and selecting the Backup Type tab. Here, you can set how your files are backed up to your media, with the following options:

  • Normal The Normal backup does a backup of every file you've selected while also clearing, or turning off, the archive bit on each file. This type of backup sets each file's attribute to signify that it does not need to be backed up again until it has changed.

  • Copy The Copy type of backup simply copies the files to your backup media and leaves the archive bit alone. Using this option, you can have several backups happening on the same files without each of them stepping on each other's toes. In other words, if you use the Copy backup option, using the Normal option still backs up every file because the archive bit is still set on them.

  • Differential This option backs up only the files that have been changed since the last normal or incremental backup, while leaving the archive bit set for each file. With this option, any file backed up looks as though it has not been backed up.

  • Incremental The Incremental option is the same as the Differential option, with the exception that it does, in fact, clear the archive bit on files that it backs up.

  • Daily The Daily option backs up all files that have been modified only on the day that the backup is performed. Be careful with this one because you could end up not backing up everything you want if you do not run nightly backups.

Differential Versus Incremental Backups

Let me give you a bit more explanation of the differences between differential and incremental backups. You can use the differential and incremental options to save time and tapes when backing up frequently. Keep in mind that full backups can take a lot of time and can fill more than one tape or disk.

If you do a full backup and then successive differential backups, each differential backup includes any files changed or added since the full backup. The successive backups do grow in size, but not by much, and you need only two backup sets to fully restore a system: the full backup and the most recent differential.

With incremental backups, only files changed since the last full or incremental backup are saved. With incrementals, the individual backup sets are indeed smaller, but you would need to restore the full and all subsequent incremental backups, in date order, to fully recover all your files. This situation is rather dangerous, in my opinion. I can hardly find my own head some days, let alone a dozen backup tapes.

For a LAN server or business computer, I recommend that you do a full backup weekly and a differential backup daily. For a home computer, you might try a monthly full backup and weekly differential backups.

All the backup options have their places in certain situations. I personally leave the backup type at Normal so that all my files are always backed up, no matter what. You might find that another option suits you better, so feel free to experiment with all these options to find the best one for you.

Restoring Data from a Backup

"The best laid plans of mice and men oft gang a'glay," as the saying goes. When you've lost data and had enough foresight to have backed it up, you're in luck. Or you hope you are, at least. Backing up is the first half of recovering your data. With any luck, you'll be able to get it back the way it was before whatever bolt of lightning hit your PC. The Restore tab of the Backup dialog comes in at this point. Restoring from a backup is a very simple process, which you can execute in three essential steps:

1.

Run the Backup program (by choosing Start, All Programs, Accessories, System Tools, Backup).

2.

Use the Restore Wizard from the Welcome tab if you want a walkthrough. Alternatively, select the Restore and Manage Media tab, and adjust a few simple parameters.

3.

Begin the restore, and insert media if and when prompted.

Of course, you might want to understand a few option and parameter details, for better control of your restorations. The following sections discuss the options. You should probably read along before doing your first couple of data recoveries. After you have the theories under your belt, then you can proceed.

Notice the left pane of the Restore tab. Here, you can view all the available Backup media pools. You can expand these nodes to display all possible source media and pools. They're displayed in a familiar tree view of the directories and files backed up to each related medium. As with the process of Backup, you simply select the files or folders you want to restore. And, of course, by selecting a top node of the tree, you include everything beneath it.

Next, it's a good idea to look at the settings on the Restore tab of the Options dialog box (Tools menu, Options). Here, you can choose from options that dictate how files will be handled if you are restoring one that already exists in your restore destination. The safest bet here is to not replace any file with a restored version. This is generally the best bet unless you have a specific reason to do so. Reasons for overwriting existing files do crop up, though. For example, if know that you somehow trashed, misedited, or otherwise mangled the file you currently have on disk, you can revert to the last-backed-up one. In that case, you need to enable replacement.

Other than the general restore options, the only real option for the restore portion of the Backup program is the option to specify the location in which you want to restore the files. You choose this option from the drop-down list at the bottom of the Restore tab. Three options are available:

  • Original Location This option restores the files to the exact place from which they were backed up. Be careful with this one; it could cause you problems with files that are open. You should make sure you're not trying to restore over a file that may be in use by another application or the system.

  • Alternate Location This option gives you the opportunity to restore the files to a destination of your choosing. If this option is selected, you are prompted for the location to which you want to restore via an entry box beneath the location options. From there, you can use the Browse button to find your restore destination. If you use this option, the directory structure of your backed-up files will be retained in the new destination.

  • Single Folder Selecting this option dumps all the files from your backup to a single folder. Be aware that using this option does not preserve the directory structure of your backed-up data. It simply ignores the structure and restores all the files to the directory you choose.

After you've selected your restore destination, you can click the Start Restore button to begin. If you selected Alternate Location or Single Folder, you're given the option to configure Restore options via the Advanced button on the Confirm Restore dialog box. The options in the Advanced Restore Options dialog are as follows:

  • Restore Security This option enables you to restore the same permissions for the files and folders you're restoring to their original settings. In most cases, choosing this option is best because you don't want to have to set them one-by-one after the restore has finished.

  • Restore Junction Points, and Restore File and Folder Data Under Junction Points to the Original Location Turn on this check box if you've created junction points using the linkd command, and you're trying to restore the junction points and the data that the junction points point to. If you don't, only the pointers are restored, not the data. You also should turn on this box if you are restoring a mounted drive's data.

  • When Restoring Replicated Data Sets, Mark the Restored Data as the Primary Data for All Replicas This option is relevant only to Windows Server 2003 and should be grayed out on any machine running Windows XP Professional or Home.

  • Restore the Cluster Registry to the quorum disk and all other nodes This option is relevant only to Windows Server 2003 and should be grayed out on any machine running Windows XP Professional or Home.

  • Preserve Existing Volume Mount Points This option most often applies when you're restoring the data for an entire drive, such as when you're replacing a drive. Typically, you put in a formatted drive, re-create the mount points, and then restore the data. You don't want to overwrite the mount points, so you turn on this option. If you have not re-created the mount points, and you want to restore the entire data and mount points as stored in the backup set, then uncheck this box.

Finally, by selecting the OK button, you can then select OK on the Confirm Restore dialog to start the restore.

Scheduling Jobs

Finally, we come to my personal favorite, the Schedule Jobs tab of the Backup dialog. This feature is a great addition to an already very capable backup program. There should really be no reason for most people not to have a reasonably current backup of their system at any given time if they use this tool.

Strategies for scheduling backups vary from person to person or machine to machine. Some people, myself included, are extremely paranoid and go for the "back up every single night" method. As you can guess, backing up this frequently saves a great deal of heartache in the event of a total system meltdown. I can't tell you how many times backing up has saved my neck. On the other hand, say you have a machine at your home or business that rarely gets used or is just acting as a proxy server. This kind of machine really only needs backups at much longer intervals than your personal workstation. In this case, it's usually safe to back up a system like this only every week or so. In the end, it's up to you how you feel you need to schedule your backups. Just remember, your system will probably go down at some point. Being prepared is the best insurance around for this nasty inevitability.

To use the scheduling features of backup, you simply double-click any date using the provided calendar or click the Add Job button. This gives you a chance to use the Backup Wizard. The options for it are very straightforward. In fact, if you read the previous section on backing up, you should have no problem whatsoever using this wizard.

NOTE

You will be prompted to set the account information for the backup because it may end up running when another logged-in user doesn't have the rights to initiate the backup. When you're prompted, you can specify a "Run As" user and password.

NOTE

The Schedule Job dialog is actually the same one used when scheduling any common task via Scheduled Tasks, a system tool covered in Chapter 27. You might want to refer to that chapter for some more details on the options.

The Settings tab on the Schedule Job dialog offers somewhat lower-priority options. You should take a gander at them, though, if you're intending to get serious about automated backups. Among the settings are those that affect idle time and power management. You should consider power settings if you're doing a backup from a laptop running on batteries. The Idle Time options could be useful if there is a possibility that someone will be using the computer when backup begins. If good computer responsiveness is important, you can ensure the backup process stops if someone sits down to the keyboard and begins work. Check the Stop the Task If the Computer Ceases to Be Idle check box.

Alternative and Creative Backup Strategies

The following sections provide a few alternative ideas for doing your backups. You can choose from many other possible ideas because of the proliferation of device types and offsite backup services (for example, CD-R, CD-RW, DVD, Internet-based services, LAN-based backups, and so on). However, you might find one of these ideas interesting and potentially very helpful in your work setting.

Using Offline Files and Folders

Windows XP has a little-known feature called Offline Files and Folders. The implementation of this tool is aimed at notebook users who connect to the corporate network, update files, and then journey off with their laptops on another adventure.

Here's how it works: The user logs on to the server and marks a network folder as available while offline. This folder and its contents are then replicated to the user's system. While on the road, the user adds new files to the folder and modifies or deletes existing ones. When the user returns and logs back on the network, Windows XP automatically synchronizes all changed filesin both directions. For example, if the user deleted a file from the offline folder on his or her notebook, the synchronization process notes the discrepancy and asks whether this file should also be deleted from the server. A similar process takes place for new or modified files.

Offline folders are also discussed in the chapter on mobile network users. To learn more about these folders, p. 697.

"This is all well and good for mobile users," you say. "But why is this topic described under backup strategies?" Because the synchronization process does not give a nit whether you physically disconnect your machine from the network; it can automatically update changed files every time you log off or on. In addition, you can easily force synchronization at any time by using a simple menu command.

TIP

Let me describe precisely how I ensure I have a recent backup of my working files throughout the course of a day. Both my main working system and my notebook have network cards, connected by a $27 twisted-pair crossover cable. The notebook has a shortcut to the folders containing all my critical data (book chapters, contact files, business correspondence, and so on), and these folders are enabled for offline access. Whenever I need a break or a distraction arises, I manually force a synchronization between the notebook and my working system. This way, if disaster strikes, I can quickly restore a damaged file by forcing another synchronization. The notebook detects whether something is amiss and offers to right the error.

Making Inaccessible Devices Accessible

The backup strategy described here, at first glance, looks a bit convoluted, but if you apply a little thought and creativity, you will be amazed at the range of possibilities that unfold from it.

Every power user has at least one device in his or her computer stable that won't play nice with another. In my case, it happens to be my USB Zip drive. The device works flawlessly on my IBM ThinkPad, but the USB port on my main working machine will not work under Windows XP until Epox comes out with a BIOS update.

This minor irritation would have remained minor had I not developed such a high regard for my trusty little Zip drive. It is fast, convenient, and flexible. It addition, it is a perfect place to copy chapter versions and backups as they evolve. In short, I wanted the same backup flexibility I had on my notebook available to me on my main machine. And being the doggedly persistent person I am, I finally found a way.

Do you remember that crossover cable I talked about earlier? If you have more than one computer in your house, or if you work on computers for a living, go buy one. It has to be the handiest item in my arsenal, and it costs only $27. A crossover cable lets you connect the LAN cards of two computers together into a mini-network without hubs or any other hardware.

As I noted previously, my notebook and my main system "talk" to each other via network cards and my crossover cable. Janus (my working system) can see Penelope (my notebook). Penelope can see and utilize the Zip; Janus cannot. But if A can see B, and B can utilize C, then why don't I give A access to C?

Here's how to make it so:

  • Computer A can talk to B.

  • Computer B has a device attached that A cannot use directly, for whatever reason.

  • On computer B, select the device from Windows Explorer and share it (select the device, right-click, and select Share from the pop-up menu displayed). Give it a share name to reflect its function or purpose.

  • Now go back to computer A and map a drive to that device (via Windows Explorer, Tools, Map Network Drive). In the folder box, you have to specify both the computer name and the device's share name. In my case, it is \\penelope\zip.

I created a shortcut on my desktop for this drive mapping and added it to my Send To menu. Now I can quickly back up a file from Windows Explorer with a single right-click.

Guarding Your Profile

Windows XP stores your user profile in the folder \Documents and Settings\<yourusername>. The subfolders contained here contain all the tweaks, configurations, and data files that make up what you see and access while working under Windows XP. Guard this folder tree with your life! With a little manipulation, this information can be copied to a safe haven and slipped back into place should the unforeseen occur, and you have to reinstall your operating system.

NOTE

If your computer is a member of a Windows domain network, and you're set up with a Roaming User Profile, your profile folder is automatically copied from the domain server to your computer when you log in and back again when you log out. It is an automatic backup, of sorts, so you can be a little more relaxed about it.

If you need to restore a profile copy in this environment, you should contact your network administrator because this task is fairly tricky.

The following are some of the invaluable goodies contained on the profile tree:

  • Your Favorites folder

  • Your History folder

  • All the configuration settings and program templates for MS Office

  • Your Desktop settings

  • The default folder for data files (My Documents)

  • Your most recently accessed files list

  • The folder your cookies are stored in

  • Your SendTo folder

  • Your Start menu configuration

  • Your section of the Windows Registry

  • A bevy of application settings, temp files, and IE history files, in a folder called Local Settings

As you can see, all this stuff is very good, and it's tailored specifically to your computing experience under Windows XP.

The root folder of your profile (in my case, C:\Documents and Settings\Bob) contains two key files: NTUSER.DAT and a backup of this file, NTUSER. They are your user Registry settings and are locked by the operating system in such a way as to forbid any other program from accessing them directly. Therefore, you cannot copy either of these files while logged on as yourusername (even if you have administrative rights under yourusername). An attempted copy operation will fail. The problem is that the rest of the tree structure is useless without these key files because they tell the operating system (and indirectly, the programs that use them) which files can be found where.

Ah, grasshopper, but this problem is not insurmountable. The following steps illustrate how you can wrestle a copy of your profile away from the arms of Windows XP.

NOTE

The following example uses a network drive as a copy point for simplicity. Realistically, the place you copy your profile is dependent on the resources at hand. The key here is to get it off your system volume and somewhere safe. This location can be a Zip drive (if it will fit), a CD-R drive, or at the very least, a separate partition. Personally, I keep my profile backed up to both another partition on my main system and a backup partition on my notebook. I tend to be a bit protective of my data, and for good reason, as you will read shortly.

1.

Log off from yourusername and log on as Administrator. This is a key step; as noted previously, you cannot properly copy your profile tree while logged on as yourself.

2.

In Windows Explorer, create a folder on a network drive you have access to, and name itfor example, Profile Backup.

3.

Go to your user profile (in my case, C:\Documents and Settings\Bob), select the highest folder in your profile tree (Bob), and drop it on the network folder you just created (Profile Backup). Go have a cup of coffee; this process could take awhile if you have several data files stored here.

4.

Last but not least, make sure you keep this backup profile updated on a routine basis. Most users can generally afford to lose a day or so of work; losing some work is unpleasant, but it is tolerable. But if you're like me, by the end of a busy week, you've probably added 10 or more "gems" to your Favorites list, messed with your NORMAL.DOT template three or four times, and shuffled your Start menu at least once.

The preceding routine is not about protecting your data; that is a separate routine which should be done on a level that reflects the value you place on the data you create every day. What it is about is protecting the configuration settings that represent your daily working environment under Windows XP.

So, you follow this sage advice and dutifully copy your profile somewhere safe on a routine basis. How is this effort going to reward you? Well, should you need to reinstall your operating system, your efforts are going to reward you by allowing you to re-create your desktop, its shortcuts, and most of your program configurations quickly and painlessly.

Trust Me, It Happens to Everyone

What follows is a personal experience I had right in the midst of writing this very chapter.

Some hard drives run for 10 years; some die an untimely death when they are only a month oldhence the term Mean Time Between Failure (MTBF), which is an average estimate of how long the drive manufacturer expects its product to run before it fails. Unfortunately, I ended up on the low end of the bell curve the other day when my three-month old hard drive died a prompt and dramatic death. Luckily, I had made a profile backup the night before onto a partition on my notebook reserved solely for machine-to-machine backups.

I borrowed a spare hard drive from a friend, partitioned it in two (always, always make a data partition on your drive), installed Windows XP on the boot partition, and installed the base productivity programs I use every day (Office 2000 and a smattering of "can't live without" utilities). This last step is an important one. To slide an alternative profile into an existing installation, you must restore your system to a point that closely mirrors when you backed up your earlier profile. In my case, this necessitates installing Office. You do not have to configure or tweak anything; just install it to ensure the Windows XP Registry knows it exists.

With all key applications installed, I connected my trusty crossover cable to my notebook, logged off as Bob, and logged back on as Administrator. I connected to the notebook's backup partition and copied my saved profile to my main system. I logged off as Administrator, logged on as Bob, and presto-pocus: My desktop returned, Word found all my tweaked document templates, my Favorites were right where I left them, and Outlook knew exactly where to find my data files. I often find myself cursing as I watch a progress bar tick away at 3 a.m. as I store my day's profile onto my notebook for safekeeping, but when I'm going the other way and fixing a disaster, that progress bar is a lovely sight indeed.

Категории