Vous êtes sur la page 1sur 13

Introduction

The Microsoft Removable Storage Manager and media (tape) management is perhaps one of the most misunderstood parts of Windows. Users frequently complain that it is too complex and frustrating to understand and use. BackupAssist simplifies the media management in Windows, allowing users to simply backup their data to whatever tape is in the tape drive. However, in certain situations it might be necessary to manually manage your tapes. This occurs most often with tapes that have been used by other software. This White Paper explains the Microsoft method for media management and gives step by step instructions on how to troubleshoot common problems. This White Paper is divided into two halves: 1. A tutorial on the Removable Storage Manager to help you understand how it all works. 2. A How-To guide on performing common tasks.

Removable Storage Manager Tutorial


Starting with Windows 2000, the operating system maintains a database of tapes that have been used with a computer. This is known as the Windows Removable Storage Manager. When a computer is newly built, and Windows is installed, there are no tapes on record in the Windows database of media. The screenshot below shows the structure of the Removable Storage database on a newly built computer. To see this information, go to: Control Panel > Administrative Tools > Computer Management. As shown in the screenshot, there are 3 media pools built into the Windows Operating System : 1. Free: contains tapes that are designated as free and available for use by applications such as Windows Backup and BackupAssist. 2. Import: tapes that are new to this computer's database of tapes. Often when you insert a tape into the tape drive for the first time, tapes will appear here (even if they have been used in another computer or by other software before) 3. Unrecognized: tapes that cannot be recognized. Either the tape is faulty, or the tape drive has malfunctioned.

Inserting a tape for the first time When you first insert a tape, it will appear in the Import media pool as shown in the screenshot below. You can find the contents of the tape drive by finding the drive under the Physical Locations branch under Removable Storage, and clicking the Media branch. In the right hand window, you see that the tape appears in the \Import\Travan pool.

Hint: The pool will vary depending on your type of tape drive. For example, for a 4mm DDS tape drive, the pool will be \Import\4mm DDS. Preparing a tape for the first time To prepare the tape in the drive, simply right click on the tape in the right hand side of the window, and select Prepare, as shown in the screenshot below.

Once the tape has been prepared, you can eject it from your tape drive, and insert your next tape. Then repeat this process to prepare all of your tapes. Now that all of your tapes have been prepared, this means that they are now ready for any application to use them. Your media pool should now look like the one shown in the following screenshot.

Note: BackupAssist will automatically take care of the tape preparation process. This information is included for informational purposes only. Running Windows Backup (NTbackup) for the first time After you run Windows Backup and backup some data to your tape, the media pools will look different. A new pool called the Backup pool is created, and now your tape is moved into the Backup pool. This means that the tape is now registered as being used by the Windows Backup program.

Once the backup is complete, your media pool will look like the screenshot above. The tape is now in the Idle, Allocated state. The Allocated state means that the tape is now officially designated as belonging to the Windows Backup program, and cannot be used by any other software. This is also a form of protection that prevents you from deleting the tape or erasing its contents. For example, if you now try to Prepare the tape by following the same process outlined above, you will get this message:

After pressing Yes, you will now receive this message. This informs you that you cannot free the tape because it is in use by another application.

How-To Guides
Manually preparing a tape that has been used by another software program 1. Insert the tape into your tape drive 2. View the Removable Storage Manager as explained in the tutorial above. Navigate down to your tape drive, and find your tape in the right hand window. 3. Note which Media Pool it appears in. o If it is in the Import media pool, your tape is already available. Go to step 4. o If it is in the Unrecognised media pool, then there is a problem either with your tape or the tape drive. o Otherwise, it will be allocated to another program. Its state will most likely be Idle, Allocated. You firstly have to Deallocate the tape by right clicking, and selecting Deallocate, as shown in the screenshot below.

You then should select Yes to the next two warning messages:

4. Now your tape should go into the Idle, Available state. You can then right click on that tape and select Prepare. How to delete a tape from the Removable Storage database If you wish to delete a tape from the removable storage database, you should firstly find the tape in the Removable Storage database. Then follow Step 3 (immediately above) to ensure that your tape is available (ie. not allocated). You must ensure that your tape is not in the tape drive. Then once your tape is in the Available state, you can press Delete to delete it from the system. If your tape is in the tape drive or it is in the Allocated state, then you will receive an error message like this one:

Please ensure that you Deallocate the media first. How to overcome the 'Required Media Missing' problem in Windows Backup Users of Windows Backup can sometimes encounter the following error message:

The reason for this message is not immediately apparent because there may well be a tape in the tape drive. Looking at the Removable Storage Manager shows that the tape is in the Unprepared state. This may occur for a variety of reasons - for example, if you try to prepare a tape but the tape is not in the tape drive.

To fix this issue, insert the tape into your drive, and right click on the tape and select Prepare.

COMMAND LINES
You can perform backup operations from the command prompt or from a batch file by using the ntbackup backup command followed by various parameters. You can access only the backup option from the command prompt. To restore files, use the Backup and Restore Wizard. This article describes the parameters available with ntbackup and several examples of how to perform a backup from the command line. The ntbackup command uses the following syntax: ntbackup backup [systemstate] "@FileName.bks" /J {"JobName"} [/P {"PoolName"}] [/G {"GUIDName"}] [/T { "TapeName"}] [/N {"MediaName"}] [/F {"FileName"}] [/D {"SetDescription"}] [/DS {"ServerName"}] [/IS {"ServerName"}] [/A] [/FU] [/V:{yes | no}] [/R:{yes | no}] [/L:{f | s | n}] [/M {BackupType}] [/RS:{yes | no}] [/HC:{on | off}] [/SNAP:{on | off}]

Ntbackup Parameters
Switch: systemstate Description: Specifies that you want to back up the System State data. When you select this option, the backup type will be forced to normal or copy. Switch: @FileName.bks Description: Specifies the name of the backup selection file (.bks file) to be used for this backup operation. The at (@) character must come before the name of the backup selection file. A backup selection file contains information about the files and folders you have selected for backup. You have to create the file using the graphical user interface (GUI) version of Backup. Switch: /J {"JobName"} Description: Specifies the job name to be used in the backup report. The job name generally describes the files and folders you are backing up in the current backup job. Switch: /P {"PoolName"} Description: Specifies the media pool where you want to use media. This is generally a subpool of the Backup media pool, such as 4mm DDS. If you select this you cannot use the /A, /G, /F, or /T command-line options. Switch: /G {"GUIDName"} Description: Overwrites or appends to this tape. Do not use this switch in conjunction with /P. Switch: /T {"TapeName"} Description: Overwrites or appends to this tape. Do not use this switch in conjunction with /P.

Switch: /N {"MediaName"} Description: Specifies the new tape name. You must not use /A with this switch. Switch: /F {"FileName"} Description: Logical disk path and file name. You must not use the following switches with this Switch: /P /G /T Switch: /D {"SetDescription"} Description: Specifies a label for each backup set. Switch: /DS {"ServerName"} Description: Backs up the directory service file for the specified Microsoft Exchange server. Exchange version: The /DS switch works only with Microsoft Exchange Server 5.5. The /DS switch does not work with Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003. Switch: /IS {"ServerName"} Description: Backs up the Information Store file for the specified Microsoft Exchange server. Exchange version: The /IS switch works only with Microsoft Exchange Server 5.5. The /IS switch does not work with Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003. Switch: /A Description: Performs an append operation. Either /G or /T must be used in conjunction with this switch. Do not use this switch in conjunction with /P. Switch: /FU Description: Enables a "file unbuffered" setting to bypass the cache manager. This change provides a number of benefits during the disk-to-disk backup process:

Sustainable throughput over time Reduction in processor utilization: on average, peak utilization is reduced to 30 percent Elimination of impacts to the system process during the backup job Note The /FU switch is available only in the revised version of Ntbackup.exe that is included with Windows Server Service Pack 1. You can also obtain this revised version by downloading it as a hotfix. To do this, click the following article number to view the article in the Microsoft Knowledge Base: 839272 System performance is negatively affected when Ntbackup.exe writes to a destination .bkf file

Switch: /V:{yes | no} Description: Verifies the data after the backup is complete.

Switch: /R:{yes | no} Description: Restricts access to this tape to the owner or members of the Administrators group. Switch: /L:{f | s | n} Description: Specifies the type of log file: f=full, s=summary, n=none (no log file is created). Switch: /M {BackupType} Description: Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily. Switch: /RS:{yes | no} Description: Backs up the migrated data files located in Remote Storage. You do not have to use the /RS command-line option to back up the local Removable Storage database (that contains the Remote Description: Storage placeholder files. When you back up the %Systemroot% folder, Backup automatically backs up the Removable Storage database also. Switch: /HC:{on | off} Description: Uses hardware compression, if available, on the tape drive. Switch: /SNAP:{on | off} Description: Specifies whether the backup must use a volume shadow copy. Note The SNAP switch is ignored in Microsoft Windows Server 2003 Service Pack 1 (SP1) and in later versions. Switch: /M {BackupType} Description: Specifies the backup type. It must be one of the following: normal, copy, differential, incremental, or daily. Switch: /? Description: Displays help at the command prompt.

Examples
The following examples show how to use the ntbackup command to back up files and folders from the command line or by using a batch file. Note that if you do not specify an option, it applies the settings that you set in the graphical version of the backup program. Example 1 ntbackup backup \\iggy-multi\c$ /m normal /j "My Job 1" /p "Backup" /n "Command Line Backup 1" /d "Command Line Functionality" /v:yes /r:no /l:s /rs:no /hc:on This example creates a normal backup of the remote share \\iggy-multi\c$ and names it "My Job 1". It pulls a tape from the Backup media pool, and names the tape "Command Line Backup 1." You can substitute "Command Line Functionality" in the command with the actual description of

your backup. This backup is verified after the backup job is complete. Access is not restricted to the owner or the administrator, and the logging level is set to "summary only." Remote Storage data is not backed up, and hardware compression is enabled. Example 2 ntbackup backup d:\ /j "My Job 2" /a /t "Command Line Backup 1" /m copy This example generates a copy backup of the local drive D:\ and names the backup "My Job 2". The backed up files and folders are added to the tape that is named "Command Line Backup 1." Example 3 ntbackup backup "@C:\Program Files\Windows NT\ntbackup\data\commandline.bks" /j "My Job 3" /t "Command Line Backup 1" /n "Command Line Backup 2" This example generates the type of backup that you specified in the graphical version of the Backup program. To specify the files that are backed up, this example uses the "Commandline.bks" backup selection file located in the C:\Program Files\Windows NT\Ntbackup\Data folder. The backup job is named "My Job 3". It overwrites the tape that is named "Command Line Backup 1" with the new name "Command Line Backup 2." Example 4 The following three commands perform a backup to a file from the command line: ntbackup backup \\iggy-multi\d$ /j "Command Line Backup 4" /f "D:\backup.bkf"

ntbackup backup \\iggy-multi\d$ /j "Command Line Backup 5" /f "D:\backup.bkf" /a ntbackup backup \\iggy-multi\d$ /j "Command Line Backup 6" /f "D:\backup.bkf" The first example shows how to backup \\iggy-multi\d$ to the file D:\Backup.bkf. The second example shows how to append the same backup to the same file. The third example shows how to overwrite the file with the same backup. In all three examples, you can substitute a complete UNC name for the drive letter. For example, instead of d:\backup.bkf, you can use \\iggy-multi\d$\backup.bkf as the backup destination. All three examples use the Backup program's default values for the backup type, verification setting, logging level, hardware compression, and any other restrictions. To start the graphical version of the Backup program, click Start, point to All Programs, point to Accessories, point to System Tools, and then click Backup.

REFERENCES
For more information about how to use the Backup and Restore Wizard, click the following article number to view the article in the Microsoft Knowledge Base: 326216 How to use the backup feature to back up and restore data in Windows Server 2003

Vous aimerez peut-être aussi