How to Schedule Unattended Backups Using a Stand-Alone Tape Library
ID: Q239892
|
The information in this article applies to:
-
Microsoft Windows 2000 Advanced Server
-
Microsoft Windows 2000 Datacenter Server
-
Microsoft Windows 2000 Professional
-
Microsoft Windows 2000 Server
SUMMARY
Windows 2000 Backup (Ntbackup.exe) is designed to work with Removable Storage Manager (RSM) to manage media during a backup session. This is especially effective when you have a tape library that holds several tapes, because RSM can automatically mount and dismount tapes as required when the scheduled backup program calls for a tape. This makes unattended backups possible because RSM loads the correct tape and either overwrites or appends to the tape, based on the backup options you choose.
MORE INFORMATION
When you have a stand-alone tape library (one that requires you to manually load/unload media), you can schedule nightly unattended backups provided the volume(s) that you are backing up fit on a single tape. There are two methods you can use to do this:
- Managed method: You can use this method when you want to manage your media. This method ensures the proper tape is always in the tape drive before overwriting the tape. This is the recommended method.
- Unmanaged method: This method simply overwrites the tape that is currently in the stand-alone tape drive with the current backup job. This method is easier to implement, but it may overwrite critical data if the proper tape is not in the tape drive prior to starting the scheduled backup. This method is not recommended if you are sharing the stand-alone tape drive with different programs.
Managed Method
To use this method, label the tapes (one for each day of the week), and then schedule a recurring weekly backup (one for each day). The only manual intervention that is required is ensuring the previous night's backup tape is ejected and the next night's tape is inserted into the stand-alone tape library. A non-technical assistant can perform this manual operation anytime prior to the next scheduled backup session.
The following section outlines the basic concept and steps necessary to prepare and label the tapes, and how to schedule Ntbackup to use the tapes. This is an abbreviated example that describes performing normal backups every night (Monday-Friday), overwriting the tape each time. Based on your needs, you may want to perform incremental backups during the week and perform full backups on the weekend using different sets of tapes. Before Ntbackup can use a tape, the tape must be located in the RSM import, free, or backup media pool.
Import media is media that RSM recognizes as being compatible with an installed program like Ntbackup, but has not been cataloged and moved to that program's media pool yet. If Ntbackup detects media in the import media pool that it recognizes, you receive a message asking if you want to import the media. After the media is imported, you can use it to perform a restore or for a new backup.
Free media is media that RSM prepares for any program to use by writing a free media label. Programs pull tapes from the free media pool the first time you use a tape, and then allocate the tape to that program's media pool for use with future jobs.
Preparing the Tape
Use the following steps to prepare each tape that you want Ntbackup to use.
NOTE: This operation writes a free media label on each tape.
- Using Computer Management, expand Storage, expand Removable Media, and then expand Physical Locations.
- Locate and expand the entry for the tape device, and then click the Media icon under the tape device.
- Insert a tape into the tape drive. RSM reads the tape, and the media pool in which it resides is displayed in the right pane (for fresh media, this is typically the unrecognized media pool).
- In the right pane, right-click the tape, and then click Prepare. You can monitor the work queue for the operation to make sure it is finished, or you can wait for the status to change to "Idle, available" and the media pool to change to "free."
- After a free label is written, you can eject the tape by right-clicking the tape, and then clicking Eject. The Eject wizard starts and moves the tape to the off-line media library.
- Repeat steps 3-5 for each tape you want to prepare. Remember that Ntbackup can only use prepared tapes during a backup session. Calculate how many tapes you need for your backup strategy and prepare each tape before you continue to the next section.
Labeling the Tape
After you prepare the tapes, use Ntbackup to write a Microsoft Tape Format (MTF) label with a name that describes the contents of the tape. After this is accomplished, you can schedule Ntbackup to use that tape over and over again, by specifying the same media label name.
Use the following steps to label each tape you want Ntbackup to be able to reuse.
NOTE: This operation writes a unique MTF label on each tape. Be sure each tape has a unique name, even if you rotate different sets of tapes (weekly).
- Make sure a prepared tape is in the stand-alone tape library.
- Start Ntbackup, and then click Backup Wizard.
- When the What to Backup dialog box is displayed, click backup selected files, drives, or network data.
- When the Items to Backup dialog box is displayed, click a single folder on any local drive.
- When the Where to Store the Backup dialog box is displayed, in the backup media type area, click the tape drive, and in the backup media area, click new media.
- When the Completing the Backup Wizard dialog box is displayed, click Advanced.
- Continue through the screens until the Backup Label dialog box is displayed. In this dialog box, you can change the Backup Label and Media Label fields. The information in the Media Label field distinguishes one tape from another. You should change the Media Label field so that it contains meaningful information to represent a tape for each day of the week. The example in this article uses unique names like Monday-Full, Tuesday-Full, and so on (one for each day/tape).
- Continue through the dialog boxes and start the backup. This backs up the single folder and writes a meaningful media label that you can use from now on to schedule backups.
- After the backup process is finished, quit Ntbackup.
- Using RSM, look in the backup media pool and notice the tape is present. Right-click the tape to view its properties. If you click the side tab, the identification label field contains the same name of the tape you specified in step 7. That is the name you want to use from now on whenever you schedule a backup for that day's tape and choose to rewrite the same label name.
- Right-click the tape, click Eject, and then physically label the tape using the same label name you specified during backup.
- Repeat the steps above for each tape until all tapes have valid MTF media labels.
Scheduling a Recurring Weekly Backup
You can schedule recurring weekly backup jobs using the built-in scheduler in Ntbackup. You can choose to build a batch file to use with the Scheduled Tasks Wizard or the at schedule command. First, you need to use Ntbackup to create a backup selection .bks file that Ntbackup uses to detect which drives/folders/files to back up. You also need to use Ntbackup to build the backup command line string to be used in the batch file(s) if scheduling outside of the backup scheduler.
To schedule recurring weekly backups:
- Start Ntbackup, and then click Backup Wizard.
- Follow the wizard screens and choose the appropriate volumes or folders you want to back up every night.
- When the Where to Store the Backup dialog box is displayed, in the backup media type area, click the tape drive, in the backup media area, click the name of the tape that matches the day for which you are currently scheduling the backup (for example, Monday-Full).
- When the Completing the Backup Wizard dialog box is displayed, click Advanced.
- When the Media Options dialog box is displayed, click Replace the data on this media with the backup.
- When the Backup Label dialog box is displayed, change the Media Label field to match the media label of the current tape. This ensures that the same tape can be mounted during the next recurring backup for this day's tape.
- When the When to Backup dialog box is displayed, click Later, and then type a descriptive job name.
- Click Set Schedule, and schedule the backup to run at the appropriate time. To make this day's backup recurring, click Weekly in the Schedule Task list.
- Repeat the above steps for each day of the week, scheduling the backup to reoccur weekly. Make sure you use the correct media label in step 5 to match that day's tape name.
- Make sure the labeled tape for the current backup is in the stand-alone tape library.
If you want to schedule a batch file to perform additional tasks along with the backup, you can copy the backup command string from a scheduled backup job by viewing any of the scheduled tasks properties from the Schedule Jobs tab in Ntbackup or by using the Scheduled Tasks tool in Control Panel. You can then put it in a separate batch file, modify the string to fit your needs, and schedule it using the at command or Task Scheduler.
The following example is a backup command line that was copied from the properties of a scheduled backup that was performed above.
NOTE: The last parameter may be /g {guid} to represent RSM Logical_Media ID instead of /t "tape_name". The {guid} value is a 32-byte value in the form of "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". You may use either parameter to represent and use the tape in a batch file. Besides looking at the properties of a scheduled backup job, the {guid} values for all logical media can be extracted using the following command, however, they are not listed in order so it is difficult to tell which {guid} value represents which tape:
rsm.exe view /tlogical_media /guiddisplay
C:\WINNT\system32\ntbackup.exe backup "@C:\Documents and Settings\bkupuser\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\daily.bks" /n "Monday-Full" /d "Mondays Full Backup" /v:no /r:no /rs:no /hc:on /m normal /j "Mondays Job" /l:f /t "Monday-Full"
You can also use the Rsm.exe command-line tool in the batch file to instruct RSM to eject the tape when the backup is finished. Use Rsm.exe and issue the following command to extract the physical media names ahead of time to use with the eject command:
rsm view /tphysical_media
PHYSICAL_MEDIA
Monday-Full - 1
Tuesday-Full - 1
Wednesday-Full - 1
Thursday-Full - 1
Friday-Full - 1
The command completed successfully.
After the backup is finished, in each day's batch file, use the rsm eject command to eject that day's tape:
rsm eject /pf"Monday-Full - 1" /astart
The following example shows a sample backup batch file to run on Mondays:
echo off
start /wait C:\WINNT\system32\ntbackup.exe backup "@C:\Documents and
Settings\bkupuser\Local Settings\Application Data\Microsoft\Windows
NT\NTBackup\data\daily.bks" /n "Monday-Full" /d "Mondays Full Backup" /v:no
/r:no /rs:no /hc:on /m normal /j "Mondays Job" /l:f /t "Monday-Full"
rsm eject /pf"Monday-Full - 1" /astart
Unmanaged Method
To use the unmanaged method, simply use the /um switch at the end of the backup command string. This tells Ntbackup to find the first available tape, format the tape, and then use that tape for the current backup operation. You must use the /p switch to designate a media pool device (for example, "8mm mp") when you use the /um switch. If you do this, you must not use the following switches:
/a
/g
/f
/t
When you use the /um switch, Ntbackup searches the following media pools for available media:
- Free pool
- Import pool
- Unrecognized pool
- Backup pool
When Ntbackup detects an available tape, the search stops, and the tape is formatted and used without prompting you for input. This command is not applicable to tape loaders and should only be used if you have a stand-alone tape device.
The following example is a sample backup batch file:
echo off
c:\winnt\system32\ntbackup.exe backup "@C:\Documents and Settings\bkupuser\Local Settings\Application Data\Microsoft\Windows
NT\NTBackup\data\daily.bks" /n "Media created date/time" /d "Set created
date/time" /v:no /r:no /rs:no /hc:on /m normal /j "daily.job" /l:f /p "8mm
mp" /um
For a list of all available backup switches or for details on switches used in these examples, you can reference the Ntbackup Help file from a command line by typing the following command:
ntbackup /?
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
Q234492 Windows Backup Creates New Tape GUID When Writing New Label
Q243260 Changed Parameters for Scheduled Backup Job May Not Be Saved
Additional query words:
unattend scheduled standalone backups kbfaqw2kperf
Keywords :
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto
|