How to schedule unattended backups using a stand-alone tape library
This article was previously published under Q239892 On This PageSUMMARY
This Windows Backup (Ntbackup.exe) tool 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 data that you are backing up can fit on a single tape. If the data cannot fit on a single tape - backup will pause and ask for new (prepared) media regardless of which method described below is used.
There are two methods you can use to perform unattended backups:
Managed MethodTo 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 to ensure that 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 before 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 TapeUse the following steps to prepare each tape that you want Ntbackup to use.Note This operation writes a free media label on each tape.
Labeling the TapeAfter 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).
Scheduling a Recurring Weekly BackupYou 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:
The following example is a backup command line that was copied from the properties of a scheduled backup that was performed above:
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"
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 can 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 Rsm.exe command. They are not listed in order, so it is difficult to tell which {guid} value represents which tape.
Rsm.exe view /tlogical_media /guiddisplay
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
The command completed successfully.
PHYSICAL_MEDIA Monday-Full - 1 Tuesday-Full - 1 Wednesday-Full - 1 Thursday-Full - 1 Friday-Full - 1 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 MethodTo 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
When you use the /um switch, Ntbackup searches the following media pools for available media:
/g /f /t
NOTE: The /um switch will only work on the initial tape request. The /um switch was not intended to be used when spanning tapes since this requires human intervention. Ntbackup does not overwrite any tape other than the original (first) tape of a backup set; any additional tapes must be manually prepared using RSM before ntbackup will use it to complete the scheduled backup. Note If you are trying to schedule a repeating backup to a single tape device using the /p switch, you may see one of the following errors in the backup report:
Note When you use the /um switch, we recommend that you do not use the /n switch to label the media. Instead, permit backup to use the default date/time as the label name and description. This eliminates multiple tapes having the same label name that may cause RSM to ask for a manual tape mount and prevent backup from continuing/completing unattended. If you want to re-use the same tape for a scheduled incremental backup by appending to the same tape, you should use the "managed method" described above instead of using the /um switch. Note Some low-cost stand-alone tape drives do not notify RSM that media has been changed. If you are using this type of tape drive, please reference the following articles for a solution or workaround: 267574 (http://support.microsoft.com/kb/267574/) Scheduled backups fail on standalone tape drives after changing media
330306 (http://support.microsoft.com/kb/330306/) Removable storage may not refresh the tape
The following are examples of backup batch files. Both examples require the Sleep.exe utility from the Resource Kit to ensure reliability. Note Some lines have been wrapped for readability. echo off start /wait rsm.exe refresh /lf"Your_Library_Name" c:\winnt\system32\ntbackup.exe backup "@C:\Documents and Settings\bkupuser\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\daily.bks" /v:no /r:no /rs:no /hc:on /m normal /j "daily.job" /l:f /p "8mm mp" /umThis is a more complex example, however, it is a real-life example that performs the following procedures completely unattended:
echo off
rsm.exe refresh /LF"HP C1537A SCSI Sequential Device"
sleep 30
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%i-%%j-%%k-%%l
for /f "Tokens=1" %%i in ('time /t') do set tm=-%%i
set tm=%tm::=-%
set dtt=%dt%%tm%
c:\winnt\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings
\Application Data\Microsoft\Windows NT\NTBackup\data\Daily.bks"
/n "%computername%-%dtt%" /d "daily %dtt%" /v:yes /r:no /rs:no /hc:on
/m normal /j "daily %dtt%" /l:f /p "4mm DDS" /UM
rsm.exe eject /PF"%computername%-%dtt% - 1" /astart
exit
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 following article numbers to view the articles in the Microsoft Knowledge Base:
234492 (http://support.microsoft.com/kb/234492/)
Backup creates new tape GUID when writing new label
267574 (http://support.microsoft.com/kb/267574/) Scheduled backups fail on standalone tape drives after changing media
243260 (http://support.microsoft.com/kb/243260/) Changed command parameters for scheduled backup job may not be saved
204833 (http://support.microsoft.com/kb/204833/) Backup can select only the first of two identical tape drives
For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base: 269600 (http://support.microsoft.com/kb/269600/) Hewlett-Packard SureStore Tape Drive may not work on computers with large amounts of memory
242881 (http://support.microsoft.com/kb/242881/) Advanced settings are not honored with scheduled backups
264604 (http://support.microsoft.com/kb/264604/) Scheduled backup jobs may not run as expected
295159 (http://support.microsoft.com/kb/295159/) Scheduled backups may hang after mounting tape
APPLIES TO
| Article Translations
|

Back to the top
