1. DEVELOPING A MAINTENANCE PLAN
It's not enough to perform the maintenance tasks in this course once -- you have to keep at it constantly to ensure your system is functioning to its full potential. In this final lesson, you'll learn how to create and implement a maintenance schedule using the Task Scheduler, and how to create management consoles that run maintenance tasks on your own computer or on a remote one on your network.
Let's kick this lesson off by making a list of all the maintenance you want to do and how often (and exactly when) to do it. Then later you'll use this information to schedule the tasks.
Creating a Backup Schedule
You should back up your important data files every day, at least the ones that have changed. You can do this manually or with a Backup utility, as you learned in Lesson 1.
Understanding Backup Types
There are three types of backups you can do, in various combinations, to create your backup schedule:
- Full: Every time you back up, you back up all the files in the set. For example, you would back up the entire contents of your My Documents folder.
- Incremental: Once a week you make a full backup, and then on other days you just back up the files that changed that day. You must keep your most recent full backup, along with the disks for each day. When the end of the week rolls around, you make another full backup and discard or overwrite the incremental backup disks.
- Differential: Once a week you make a full backup, and then on other days, you back up whatever has changed since that full backup. Each day's backup set is larger with differential, but you have to keep track of only two disks: the full one and the most recent differential one.
So how does the program know which files have changed and which haven't? It uses the archive attribute (sometimes called an archive flag) for each file. Every file has an archive attribute, which is either on or off. When you back up a file, the backup program turns off the Archive attribute for that file to indicate that it's been backed up. When you modify a file, the operating system sets the file's Archive attribute to On, indicating it's been changed since the backup.
To see this for yourself, right-click any file and select Properties. On the General tab is an Archive checkbox. You can manually set the archive flag yourself by marking or clearing this checkbox, as shown in Figure 6-1.
If the Properties box for the file doesn't look like the one in Figure 6-1, specifically, if it has an Advanced button instead of an Archive checkbox, click the Advanced button to open an Advanced Attributes dialog box, and in that box, check or clear the File is ready for archiving checkbox. It's the same thing, just a different way of accessing it. (The difference is the file system; Figure 6-1 shows a file on a disk that uses the FAT32 system, and the Advanced button appears for files on a disk that uses the NTFS file system.)
In Microsoft Backup, the archive attribute is cleared for a file when you back it up with a Full or Incremental backup, but not a Differential backup. Why? If you do an incremental backup, that means that the next day you do another incremental backup. Only the files that have changed since the current day's backup are included in the next day's set -- they're the ones that have changed (and therefore have the archive attribute set to On). On the other hand, if you do a differential backup, to back up the files that have changed since the last full backup, you do not want the archive attribute to change for the files because you want them to be backed-up again the next day.
Performing a Scheduled Backup with Microsoft Backup
As an experiment, follow these steps to set the backup type for a specific backup job. You can do a backup or you can cancel in the last step.
- Select Start > All Programs > Accessories > System Tools > Backup.
- Click the Advanced mode hyperlink.
- Click the Backup tab.
- Select the folder(s) to back up.
- (Optional) To change the default backup type, select Tools > Options, click the Backup Type tab, and then select the backup type that should be the default (Normal, Copy, Incremental, Differential, or Daily.) Click OK.
Normal is what Microsoft Backup calls Full. Copy makes a full backup but does not mark the files as having been backed up. Daily selects only the files that were changed that day.
- Click Start Backup. The Backup Job Information dialog box opens.
- Click the Advanced button. The Advanced Backup Options dialog box opens, shown in Figure 6-2.
- Select the desired backup type for this job only from the Backup Type list.
- Click OK.
- Click Start Backup.
Remembering to Back Up
The challenge in any backup schedule is to remember to do it. If you use a Backup utility such as Microsoft Backup, you can schedule the backup program to start at a certain time automatically through the Windows Task Scheduler, covered later in this lesson.
If you do it manually, you need to figure out a way to remember. One way is to set an alarm or reminder for yourself in a program, such as Microsoft Outlook, that has a calendar in it. Another way is to schedule some dummy task to occur using the Windows Task Scheduler, such as the Calculator program opening, and then just remember that whenever you see that program run, it's time for a backup.
2. SCHEDULE MAINTENANCE TASKS
Backup is the only maintenance task that needs to be done every day; the others can be spaced out a bit more or even put off indefinitely, without putting your system at any peril.
You may come up with your own schedule, but here's one possible schedule you could follow:
- Differential or Incremental Backup: Daily
- Full Backup: Weekly
- Disk Cleanup: Monthly
- Disk Defragmenter: Monthly
- Desktop Cleanup Wizard: Monthly
You also must decide when to do each maintenance task. An ideal time would be in the middle of the night or whenever you're not using the computer. But the catch, of course, is that if you're not using your computer, you're not available to start the utility, right? That's where the Task Scheduler comes in.
You should also run Check Disk at least every other week, but it cannot be scheduled with the Task Scheduler. You need to remember to run it or set yourself a reminder.
Windows Task Scheduler
The Windows XP Task Scheduler takes all the work out of remembering to run the various utilities at specified times. You set up a task to run, and the Task Scheduler takes care of it automatically.
The Task Scheduler does not complete the maintenance tasks automatically in most cases -- it only starts them. User intervention is usually required to complete them.
To see how it works, let's try scheduling Disk Cleanup to run every other week:
- Select Start > All Programs > Accessories > System Tools > Scheduled Tasks. The Scheduled Tasks folder opens. (You can also open this folder from the Control Panel.)
- Double-click Add Scheduled Task. The Scheduled Task Wizard opens.
- Click Next.
- Select the Disk Cleanup program from the list provided, and then click Next.
- Click Monthly, and then click Next.
- Select a date and time. For example, Figure 6-3 shows a task scheduled to run at 3:00 AM on the 5th day of every month. Click Next.
- Enter the user name and password for the user to run this job. (Just enter your own Windows user name and password here. If you don't use a password, leave those checkboxes blank.) Click Next.
- Click Finish. The Wizard ends, and a new icon appears in the Scheduled Tasks folder. You can edit that scheduled item anytime by double-clicking its icon there.
- Now double-click the task's icon, and examine its properties. Notice that there are some additional properties here that you did not see in the Wizard. Make a mental note of them, and then click OK to close the dialog box.
3. AUTOMATING THE DISK CLEANUP TOOL
If you do the preceding setup steps, the Disk Cleanup tool starts automatically at the specified time. However, it does not run automatically because it requires human intervention to confirm before deleting data. That's the case with most utilities.
However, in the case of Disk Cleanup, there's a way to make it fully automated, by preentering your preferences of what to delete. Follow these steps to try it out.
- Schedule Disk Cleanup to run (see the preceding section).
- Select Start > Run. In the Run box, type cleanmgr /sageset:1, and then click OK. (Actually you can use any number here, from 0 to 65535.)
- In the Disk Cleanup Settings dialog box that appears, mark the types of content you want to automatically delete during the cleanup process, as shown in Figure 6-4.
- Mark the checkboxes for the content to be automatically deleted, and then click OK.
- In the Scheduled Tasks window, double-click the icon for the scheduled Disk Cleanup task to open its Properties dialog box.
- On the Task tab, add /sagerun:1 to the end of the command in the Run box, for example:
C:\WINDOWS\system32\cleanmgr.exe /sagerun:1
- Click OK. If prompted to reenter your password, do so, and then click OK.
The reason you can put any number with sageset and sagerun is that you can create different preference sets to run at different times. Each numbered set could have a different scheduled task entry.
Now when Disk Cleanup runs, it should run automatically with the settings you provided. The previous steps will run Disk Cleanup on every eligible drive; if you want only a certain drive, add the /d x : switch also, where x is the desired drive letter.
4. MICROSOFT MANAGEMENT CONSOLES
Next let's look at another way of making routine maintenance more convenient to perform in Windows XP. You can create a MMC (Microsoft Management Console) and add various system tools to it, and then open the console for quick access to all the tools you need at once.
One of the side benefits of using an MMC rather than individual applications is that you can create MMCs that run utilities on other computers on your network, not just your own. That way if you're in charge of the maintenance for a whole workgroup, you can run all the maintenance tasks on all the other computers from your own computer. This lesson does not cover that, but you can set it up easily enough; when setting up a maintenance task, there's a prompt that asks you to select whether this task should apply to your own computer or a remote one on your network.
You create a new MMC, and then you add utilities to it in the form of snap-ins. A snap-in is a version of a utility that can work within the MMC.
Follow these steps to create a new MMC and run it as a snap-in:
- Select Start > Run. Type MMC and then click OK. A blank Microsoft Management Console window opens, as shown in Figure 6-5.
- Select File > Add/Remove Snap-in.
- Click the Add button. A list of available utilities appears.
- For this example, select Disk Defragmenter, and then click Add. The dialog box stays open.
- For this example, select Disk Management, and then click Add. A dialog box appears asking whether you want to run it for your own or some other computer.
- Leave This computer selected, and then click Finish.
- Click Close to close the list of applications, and then click OK. Now you have two snap-ins in the console.
- Double-click Disk Defragmenter. The Disk Defragmenter utility appears in the right pane, as shown in Figure 6-6. You can run it from here just as you would from a standalone window.
- Save your console to the desktop. (Select File > Save, click the Desktop shortcut at the left, enter a name such as TestConsole, and then click Save.)
- Close the console window, and then reopen it from the desktop shortcut.
5. OTHER UTILITIES AVAILABLE FROM THE MMC
Besides the utilities you've learned about in this class, the MMC provides many others. Here's a partial list. Experiment by adding several of these to your console to see what they do:
- ActiveX Control: Enables you to add ActiveX controls to a console.
- Certificates: Allows you to browse the stored certificates on your computer.
- Computer Management: Is a handy multipurpose console that allows you to run Disk Defragmenter, Disk Management, and several others.
- Device Manager: The list of hardware installed on the computer.
- Event Viewer: Displays event logs that can help you track down system problems.
- Link to web Address: Enables you to add items that refer to certain web pages.
- Local Users and Groups: Shows the authorized users and groups and enables you to edit those lists.
- Performance Logs and Alerts: Displays and configures data logs and alerts.
- Services: Starts, stops, and configures Windows services.
- Shared folders: Displays shared folders and tells you who's accessing them and which files are opened.
Moving On
Congratulations! You've made it to the end of this course. You may have started out not knowing much about Windows maintenance, but now you can check disks for errors, defragment them, back them up, download Windows updates, check for viruses, and much more. Before you leave, do the final assignment and quiz, and then ask any last-minute questions on the Message Board.
Good luck with your continuing education!
