Chapter 14: Backups and Scheduling


In Brief

Most companies and people couldn't continue to be in business or do their work if all their data were lost. Backups provide an easy method to restore a system or a set of files after some corruption, deletion, or hardware failure has taken place. Backups are an extremely important part of your task as an administrator ”something that no one likes to do, but everyone appreciates when needed. Although many third-party backup tools are available, a limited budget or compatibility issues might prevent you from using them.

In previous chapters, you learned how to back up files and the registry using simple scripts. In this chapter, you will learn how to automate backups and ERDs (Emergency Repair Disks). You will also learn how to schedule your backups and scripts to run automatically.

Backups under Windows 2000/XP/2003

NTBackup (New Technology Backup) is a utility that allows you to back up your registry and data files. These backups are stored using the Microsoft Tape Format (MTF). NTBackup can read and restore any backup stored in this format. This includes many of today's third-party backup programs that comply to this format, such as Veritas Backup Exec. Before performing any backup, you should decide which type of backup you would like to perform. NTBackup supports the following backup types:

  • Full ”Also called a normal backup, backs up all the files specified. The archive bit is cleared for all files backed up. This provides the most complete backup but also takes the most time and occupies the greatest amount of storage space on the backup media. This backup type provides the quickest restore method.

  • Incremental ”Only backs up files that have changed since the last full and incremental backup. The archive bit is cleared for all files backed up. This backup type requires marginal time and backup space but provides the longest restore method because the full backup and all other incremental backups must be restored sequentially.

  • Differential ”Only backs up files that have changed since the last full backup. The archive bit is not cleared for any files. This is the most common backup method used and provides an average restore time because the full backup must be restored before a differential backup can be restored.

  • Daily ”Only backs up files modified on the day the backup is performed. The archive bit is not modified.

  • Custom ”Allows you to specify which files to back up. This method is most commonly used on an on-demand basis when a small number of files are to be backed up.

  • Copy ”Copies files to the backup media. The archive bit is not cleared because you are merely copying files. This method is best used when you want to perform backups in combination with other backup utilities, and do not want the archive bit to be modified.

Note  

An archive bit is a file attribute that is cleared when a file is modified. This is a signal to all backup programs that this file needs to be backed up.

New and Improved

Starting with Windows 2000, NTBackup supports many new features, such as scheduling and UNC support. In addition to tape devices, NTBackup can now back up data to removable media, such as a Jaz or Zip drive, using Remote Storage Management (RSM). You can back up to any removable media that RSM supports and that does not require special formatting at the time of backup. RSM cannot back up to CD-R (Compact Disc Recordable), CD-RW (Compact Disc ReWritable), or DVD-RAM (Digital Versatile Disc Random Access Memory) because it sees these devices as read-only. As with both versions of NTBackup, a major drawback to this backup utility is that you can only back up folders, not files.

Note  

You cannot restore files from the command line using NTBackup.

Best Backup Practices

The following list describes the best backup practices to help protect your data:

  • Secure your backups. Many companies protect their servers and yet leave their backup tapes in an open cabinet. If an intruder can access your backup tapes, he or she can access your data.

  • Perform backup verifies. Verify compares the contents of the backup media with the targeted files backed up, and reports any corruption or differences.

  • Test your backups and hardware regularly. Although your backup software may state that your backups are successfully running, there is no real indication of this until you perform a restore.

  • Rotate your backups offsite. If something happens to your office building or location where you store your backups, you'll be glad you stored more tapes in another location.

  • Store your backups in a fire/water-proof container. Tapes are very sensitive to corruption, especially heat. Storing your tapes in fire/water-proof containers helps protect your backups from damage.

  • Remember that backups can be subpoenaed. Only back up files you wouldn't mind discussing in court .

  • Establish a written backup policy and stick to it. This helps ensure that all the backup practices mentioned here, and many others, are clearly understood and followed daily.

Scheduling Windows NT/2000 Tasks

The AT command is a command line utility that allows you to schedule applications to run based on a predetermined schedule. You can use this command to automatically launch your backups, scripts, or any other tasks you can think of. The AT command works with the schedule service to monitor the system time, start tasks, and run the programs under the security context of the specified account.

The Evolution of the AT Command

Originally, the AT command worked with a service called schedule (ATSVC.EXE) that, by default, was configured as a system service. You could later configure this service to run under a specific administrative domain account, allowing your tasks to run for all users regardless of user privilege.

The New and Improved Task Scheduler

If you have at least Windows 2000 or Microsoft Internet Explorer 4, the schedule service is replaced with the Task Scheduler service (MSTASK.EXE). This service does not need to be configured with a specific account because you can now specify these credentials with each new task you create. For backward compatibility with tasks created by the AT command, you can still set the Task Scheduler service to run under a specified account.

The new task scheduler also adds a control panel applet called Scheduled Tasks, that provides a graphical interface to create, view, and modify scheduled tasks created by the AT command or task scheduler. These tasks are stored in the % WINDIR %\tasks directory. Although you can view and modify tasks under the Scheduled Tasks applet, the AT command does not recognize tasks created by the new task scheduler. This is because tasks created by the task scheduler can use additional features and require a specific user account to run. Any task created by the AT command will be converted to a task created by the task scheduler if a specific user account is specified or if any of the task scheduler's additional features are used, such as power management.




Windows Admin Scripting Little Black Book
Windows Admin Scripting Little Black Book (Little Black Books (Paraglyph Press))
ISBN: 1933097108
EAN: 2147483647
Year: 2004
Pages: 89

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net