Monday, 22 August 2011

NT Backup


  • lick Start->Run and type ntbackup
  • Click the Advanced Mode link
  • Click Backup Wizard (Advanced)
  • Click Next
  • Make sure Back up everything on this computer is selected and click Next
  • We will backup to a file, you can place it wherever you want, just make sure you name it Friday and click Next
  • Click Advanced
  • Make sure Normal is selected as type of backup and click Next
  • Check the box Verify data after backup and click Next (You will most likely have errors when the backup is completed and verified. This is because System State data is changed all the time. If there are too many errors, there might be problems with the file you are using to back up data.)
  • Click Replace the existing backups and click Next
  • Click Later and in the Job Name box type Friday Nights, click Set Schedule
  • In Schedule Task select Weekly and as Start time 11:00 PM (or whenever you want the backup to be scheduled). Make sure it's set to run every 1 week and on Fridays. Click OK
  • You will be prompted to run the task as a user. Use a user with privileges to backup data.
  • Click Next
  • Click Finish
The Backup Wizard should close and you should be back in the Backup Utility. You can now verify that the backup is scheduled by clicking on the Schedule Jobs tab.
In case you want to edit the backup you can do it from here. Just click the backup symbol on the day you want to edit.
  • Click the Welcome tab and start the Backup Wizard again.
  • Click Next
  • Select Backup selected files, drives or network data and click Next
  • Expand My Computer in the left pane and select all drives (in my case C: and D:) and click Next
  • Name it Monday and click Next
  • Click Advanced
  • Select Incremental as type of backup and click Next
  • Check the box Verify data after backup and click Next
  • Click Replace the existing backups and click Next
  • Click Later and in the Job Name box type Monday Nights, click Set Schedule
  • In Scheduled Task select Weekly and as Start time 11:00 PM (or whenever you want the backup to be scheduled). Make sure it?s set to run every 1 week and on Mondays.
  • Click Advanced and set the Start Date the same day as when the full backup will run. In my case that is January 03, 2003, so that is the start date I choose. Click OK, click OK
  • You will be prompted to run the task as a user. Use a user with privileges to backup data.
  • Click Next
  • Click Finish
Use the steps above to create incremental backups for the other five days of week. Of course all this can be done by writing a script, but I'll leave that for now. And again, this is only a suggestion for a backup strategy. A backup strategy varies from company to company and it is not something you develop in one hour. You must analyze and find out what fits your company best. Also remember that if you followed the steps above, you will only save the backup files for a week. This is probably not what you want, and you have to schedule a script to move the files every week.

Where are the log files?

Of course you should read the log files so you are sure that the backup was successful. You do this be looking in Event Viewer for error messages, and you can also read a complete report by clicking Report on the Tools menu. If you want to log more or less, take a look in the Options on the Tools menu, and click on the Backup Log tab.

Restore data

It's Wednesday, and you discover that an important file is corrupt. The question is, how do I restore the file from a backup? Well, it's quite simple. The first thing we have to do is locate where the file are. If we know where on the disk it's supposed to be, we can start from the latest incremental backup (Tuesday) and try to find it. If it's not there, it means that the file was not altered, and we have to try the next file (Monday). On the other hand if we do not know where the file is, we have to restore the full backup file (Friday), find the file, and then find out if there is a newer version.
  • If the Backup Utility is not open, open it and click on the Advanced Mode link.
  • Click Restore Wizard
  • Click Next
  • Expand Tuesday.bkf, find the file you want to restore and check the box in front of the file. In my case it is 0055.txt in D:\sql
  • Click Next
  • Click Advanced
  • Select Single Folder. This is because I am only restoring one file, and I don't want to restore it to the original location. If I choose Alternate Location it will keep the folder structure (in my case it will create the folder sql). Usually you will use Alternate Location when restoring files.
  • In Folder Name type where you want to restore the file (in my case c:\restore) and click Next
  • Select Leave existing files and click Next
  • Make sure Restore security settings and Preserve existing volume mount points are selected and click Next
  • Click Finish
That's it! The file is restored.
You use the same process to restore System State data. Just remember that if you are restoring the System State data on a Domain Controller you must start the computer in Directory Services Restore Mode, which you access be pressing F8 when the computer is starting. And if you want to perform an Authoritative restore, remember to run ntdsutilbefore restarting the computer. More info about the ntdsutil can be found by typing ntdsutil /? in a command prompt.

Use the Restore and Manage Media tab

This is the tab where you format tapes, mark a tape as free, delete catalogs etc. And everything is very simple to do, just right click the object you want to do something with, and choose what you want to do.

Advanced Options

There are a lot of other options you can set to get the Backup Utility to work as you want. You access this from the Tools menu and then click Options. I will not write about everything here, instead I recommend you take a look there and if there is some option you do not understand, use the ? in the upper right to get more info about it.

Recovery Console

When nothing else works, Recovery Console saves you. You can use Recovery Console when you cannot boot into safe mode to read and write data (including NTFS) on local drives, enable and disable services, and many other things.
You can start the Recovery Console in two ways:
  • Boot the Windows Server 2003 CD and start the setup. When the text-based setup begins follow the prompts and choose recover by pressing R
  • Select Recovery Console from the list of available Operating Systems. To do this you must run a x86-based computer and install Recovery Console.
When you have started the Recovery Console, you will have to choose which Operating System to recover (if you are multi-booting). After that you will be prompted for the password for the administrator account. When you are logged on you will get a console from which you perform all tasks. This console is very similar to the command prompt in Windows Server 2003. The only command you have to remember is help. By writing that you will get a list of available commands to use. If you don't know how to use a command, write the command name followed by /? . To exit the Recovery Console, write exit.

Install Recovery Console

You can only install the Recovery Console on a x86-based computer.
  • Click Start and then Run
  • Type (where x is the CD-ROM drive letter) x:\i386\winnt32.exe /cmdcons
  • Follow the wizard

Remove Recovery Console

  • Open My Computer and double click the hard drive on which you installed the Recovery Console
  • Click on Tools->Folder Options
  • Click on the View tab, check Show hidden files and folders and clear the Hide protected operating system files check box
  • At the root directory delete the folder Cmdcons and the file Cmldr
  • Right click My Computer and click Properties
  • Click on the Advanced tab and under Startup and Recovery click the Settings button
  • In System startup click the Edit button. This will display boot.ini in Notepad
  • Remove the entry for Recovery Console, it will look like: C:\cmdcons\bootsect.dat="Microsoft Windows Recovery Console" /cmdcons
  • Save the file
Remember that the boot.ini is a very important file, and if you modify this incorrectly you can cause the computer to not boot up.

Automated System Recovery

Do you remember Emergency Repair Disk (ERD)? Forget about it. Well, ok, not yet, you have probably still some Windows 2000 Servers. But ERD is replaced by Automated System Recovery (ASR) in Windows Server 2003. ASR is a last resort and should only be used when options like Safe Mode and Last Known Good Configuration fails. ASR consists of two parts: backup and restore. The backup part can be accessed through the Automated System Recovery Preparation Wizard in the Backup Utility. This wizard backs up the System State data, system services and all disks associated with the operating system components. It also creates a floppy disk that you should store in a safe place. This floppy disk contains for example information about the backup.
When recovering by using ASR it will use the floppy disk to read the disk configuration and restore the disk signatures, volumes and partitions that is required to start your computer. ASR then installs a simple installation of Windows and automatically starts to restore from the backup ASR created in the wizard.
ASR will not backup data files. That should be backed up separately.

Create an ASR set

  • Start the Backup Utility by clicking Start->Run and type ntbackup
  • The Backup or Restore Wizard starts by default, we will not use this(though we could) , so click the Advanced mode link
  • On the Welcome tab, click Automated System Recovery Wizard
  • The wizard is pretty self-explained so follow it

Recover using ASR

  • Boot from the Windows Server 2003 CD and start the installation.
  • If you have a mass storage controller and must install drivers for it, do that by pressing F6 when prompted
  • Press F2 when prompted. You will be prompted to insert the ASR floppy, do that.
  • Follow the wizard
  • You will reboot and if you pressed F6 previously, do that again when prompted
  • Follow the wizard
Best Strategy for backups are as follows
DayType of backup
Friday nightFull backup (normal)
Saturday nightIncremental, files and folders only
Sunday nightIncremental, files and folders only
Monday nightIncremental, files and folders only
Tuesday nightIncremental, files and folders only
Wednesday nightIncremental, files and folders only
Thursday nightIncremental, files and folders only

No comments:

Post a Comment