Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Windows 2000 Backup

Windows 2000 Backup Routine by Jump1ng
Posted: 7 Apr 04

This document outlines the step required to perform a daily scheduled backup of a Windows 2000 server using NTBackup.

Installation and Preparation

First make sure that the tape unit is installed and working ok and that you have at least service pack 2 installed on the server (I recommend installing SP4 as it fixes a lot of problems) MS fixed a lot of problems with the backup in SP2 but later service packs are more reliable.

To use a tape you need to prepare it before you can use it, even if its only a manual backup you want to take. To do this insert a tape and right click on ôMy Computerö and select ômanageö. Towards the bottom you will see ôRemovable Storageö expand this and then expand ôPhysical Locationsö. You will see the tape unit installed in your machine here. Expand the tape unit icon and the click on the ômediaö icon. In the right hand window you will see the tape that is in the drive at present. Click on the tape and select ôprepareö. This action will prepare the tape and move into the free media pool. The tape is now ready to use.

You should do this for all the tapes you want to use in windows 2000 backups, but you will use a switch with your backup batch file that will do this for you.

Backup File Selection

Next step is to open Ntbackup.exe and create a file selection set. This is simply a list of the files and folders that you want to backup.

Tick the boxes next to the drives you wish to include in the backup and then save the selection from the JOB / Save as dropdown menu to a selection available when you run the backup (I would recommend c:\backup or something that is easy to find) because the default location of this file is under Documents and Settings for the person logged on when you started Ntbackup.exe.

Also when you are in Ntbackup go to TOOLS and OPTIONS menu and tick ôAlways move free media to the Backup media Poolö. This will create the default action of allowing Ntbackup to use any tape and will come into effect if the backup has to be done manually for some reason.

Batch files

Now configure your backup batch file to place in the schedule. Open up notepad or any text editor and create a file looking something like this.

net stop ntmssvc
sleep 60
net start ntmssvc
sleep 60
rsm.exe refresh /lf"HP C5683A SCSI Sequential Device"
sleep 60

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 systemstate "@C:\backup\BACKUP.bks" /n "Nameyourbackuphere %dtt%" /d "Nameyourbackuphere %dtt%" /v:no /r:no /rs:no /hc:on /m normal /j "%dtt%" /l:s /p "4mm DDS" /UM
rsm.exe eject /PF"Nameyourbackuphere %dtt% - 1" /astart

You will have to change this line ôrsm.exe refresh /lf"HP C5683A SCSI Sequential Device"ö to the exact label what the tape drive is called on your system. If you highlight the tape unit and select properties you can copy and paste this label into your batch file.

You will also have to change this ô/p "4mm DDS"ö to suit your tape unit if you have a DLT tape unit change 4mm DDS to DLT.

The sleep command is there to allow the Remote Storage Manager to refresh the Media pools. Copy the sleep.exe into winnt\system32, the value after it denotes the time in seconds Windows should wait before moving onto the next command. 60 seconds should be enough for this task.

The next four lines are there to create a meaningful description of the tape label and library. Although these are not strictly necessary but I would recommend leaving them in unless you are experiencing problems with the tape labels. Using these command line variables will create a tape label that reflects the date and the date the backup took place. Which makes it easier to restore.

If we breakdown the commands it will make it easier to understand what they do.

Specifies that you want to backup system state data registry, repair info etc. This switch doesnÆt have to be used if the System State button was checked when you created and saved your backup selection file.

bks filename
Specifies the name of your backup selection file  (.bks file) to be used for the backup operation. Remember to change this to your path.

/j {"job name"}
Specifies name your job in the backup log file.

/p {"pool name"}
Specifies the media pool from which you want to use media.

Verifies your data after backup.

Restricts access to this tape for the owner or members of the Administrator group.

Specifies the type of log file f=full, s=summary, n=none.

/m {backup type}
Specifies the backup type. It has to be either: normal, copy, differential, incremental or daily.

Backs up the Removable Storage database.

Uses hardware compression if it is available on the tape drive.

Finds the first available media, formats it, and uses it for the current backup operation. Use the /p switch to designate a device-type media pool when you use the /um switch so that Ntbackup searches for the appropriate type of media such as 4mm DDS. When you use the /um switch, Ntbackup searches the following media pools for the available media: Free pool, Import pool, Unrecognised pool, and Backup pool. When available media is found the search stops and the media is formatted and then used without prompting you for input. This command is not applicable to tape loaders and you should only use it if you have a standalone tape device. The /um switch should be at the end of the command line and should not be enclosed in quotes.

The last line in the backup ôrsm.exe eject /PF"Nameyourbackuphere %dtt% - 1" /astartö should make the tape drive eject the tape after backup.

Exchange Server

Ntbackup can backup both Exchange Server 5.5 and 2000 but the way its done depend on the version used. Exchange Server 2000 has changed somewhat from 5.5. In the past it was necessary to use switches to backup the Directory and Information Stores, now with Exchange 2000, the Directory Store (DS) switch is not relevant since it uses the Windows 2000 Active Directory.

If the Windows 2000 server has Exchange 5 or 5.5 running you will need to specify the Information and Data Stores specifically within the backup batch file. These switches for this operation is similar to the old NT4 backup script.

/ds {"Server name"}
Backs up the directory service file for the specified Microsoft Exchange server.

/is {"Server name"}
Backs up the Information Store file for the specified Exchange server.


Go into task scheduler and ôadd scheduled taskö follow the wizard and select your backup file. In the next window select ôWeeklyö and choose which days to run the task. Next enter a user to perform the backup û preferably a dedicated user for scheduled task which have been granted administrator and backup operator rights.

Backup Logs

The log files are located under the user profile of the user that ran the backup. So if you create a user called schedule to run the backup tasks the log files will be in the folder ôc:\Documents and Settings\schedule\local settings\application data\Microsoft\windows nt\backup\data. I would recommend to create a shortcut to this folder on the ôall usersö desktop to make it easier for the person who checks the backup also make sure that this person got rights to read that folder.

Trouble Shooting

Ntbackup under Windows 2000 doesnÆt seem to be as reliable as it was on NT4 but if you install SP3 or better SP4 it is documented to resolve a lot of the backup problems. If you have a problems with the backup routine then work at it logically. Remember that it can work  and that it will work.

First check the log file dates to check if the schedule is running. If there is no log file then the task didnÆt run. In this case its likely that the schedule service is not running or has fallen over. If this is the case restart the service or better if its possible restart the server. Once restarted, test the schedule task by creating a task to start calc.exe this will tell you quickly if the Scheduler is running or not.

If calc started create a new schedule for your backup to see if it starts. If it doesnÆt re-enter the user name and password you want the backup to run under and try it again. If that still doesnÆt work re-create the backup task from scratch.

If you receive an error in the log file stating that the requested media was not available then its is likely that the RSM database is not getting refreshed or is corrupt. Make sure that the rsm.exe refresh line is in the batch file and that the device is correctly entered. If not change it and save the file.

You could also put this line in a separate batch file and run it before the backup. This line can be run at any time and as often as you like, it will not alter anything. It should be ran at least once after the next tape is placed in the drive either on its own or as part of the backup routine.

I have seen problems with the tapes being logically stuck in the database even after they had been physically ejected. This has happened after the backup hung and was stopped by using a command like Kill.exe to stop the backup command. If this happens you need to right click on the tape within the pool and select dismount. The logical location of the tape at this point can vary. However simply stopping and starting the RSM service, can address many problems with the tape pool management and the RSM. ThatÆs why I always include this in my backup routine.

This is my first try at writing a faq so any feedback would be appreciated, and hopefully it answers some problems people have with the windows 2000 backup.

Good luck with your backup

Back to Microsoft: Windows servers FAQ Index
Back to Microsoft: Windows servers Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close