[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1114
  • Last Modified:

Automating ASR

Hi,

Does anyone know how to automate the ASR process? It's such a pain trying to manually make ASRs during the weekly maintenance activities in our environment.

AlwaysAlert
0
AlwaysAlert
Asked:
AlwaysAlert
  • 2
  • 2
1 Solution
 
Bradley HaynesCommented:
Re: How to automate ASR restore process
Create a Cron job; or in windows set up a schedule task.
If you like you can follow these instructions for automating the ASR  restore points -  I found in a w2k3 forum:
-----------------------------------------------------------------------------------------------
Hello,

You may follow these steps:

Setting up the RIS server to use ASR
1. Set up the RIS server to support automation of the F12 PXE boot that
executes the ASR restore option. To do this, follow these steps:
a. Verify the BIOS boot order on the RIS server and on each of the client
computers. Position the hard disk first in the boot order, and then
position the PXE option second in the boot order.
b. Rename the current Startrom.com file as Startrom.bak (for backup
purposes). This file is located in the \\RISserver\Reminst\OSChooser\I386
folder on the RIS server,
c. Rename the Startrom.n12 file as Startrom.com. This file is located in
the \\RISserver\Reminst\OSChooser\I386 folder on the RIS server. The new
version of Startrom.com automates the process when the user presses F12 to
prompt Trivial File Transfer Protocol (TFTP) for the initial download.

2. Make backups of the following files, and then rename them in the
\\RISserver\Reminst\OSChooser\Language folder:
? Rename Welcome.osc as Welcome.bak.
? Rename Login.osc as Login.bak.
? Rename Install.osc as Install.bak.
? Rename Warning.osc as Warning.bak.


Note As a best practice, make a backup copy of each .osc file before you
make any changes in the \\RISserver\Reminst\OSChooser\Language folder.
3. Edit the following .osc files on the RIS server: a. Welcome.osc <OSCML>
<META KEY=ENTER HREF="LOGIN">
<META KEY=F3 ACTION="REBOOT">
<META KEY=ESC HREF="LOGIN">
<META KEY=F1 HREF="LOGIN">
<TITLE> Client Installation Wizard
Welcome</TITLE>
<FOOTER> [ENTER] continue </FOOTER>
<META ACTION=AUTOENTER>
<BODY left=5 right=75>

Welcome to the Client Installation Wizard. This Wizard helps you quickly
and easily set up a
new operating system on your computer. You can also use this Wizard to
keep your computer
up-to-date and to troubleshoot computer hardware problems.

In the Wizard, you are prompted to use a valid user name, password, and
domain name to log on
to the network. If you do not have this information, contact your
network administrator
before continuing.
</BODY>
</OSCML>
Copy this code to the \\RISserver\Reminst\OSChooser folder, and then save
the file as Welcome.osc. After you add "META ACTION=AUTOENTER" to this
code, the user does not have to press ENTER in the Client Installation
Wizard because this action is automated.
b. Login.osc <OSCML>
<TITLE> Client Installation Wizard
Logon</TITLE>
<FOOTER> [ENTER] continue [ESC] clear [F1] help [F3]
restart computer</FOOTER>
<META KEY=F3 ACTION="REBOOT">
<META KEY=F1 HREF="LOGINHLP">
<META KEY=ESC HREF="LOGIN">
<META ACTION="LOGIN">
<META ACTION=AUTOENTER>
<BODY left=5 right=75>

Type a valid user name, password, and domain name. You may use the
Internet-style logon
format (for example: someone@example.com).

<FORM ACTION="CHOICE">
&nbsp&nbspUser name: <INPUT NAME="USERNAME" MAXLENGTH=255 TYPE=TEXT
VALUE=*****>
&nbsp&nbsp&nbspPassword: <INPUT NAME="*PASSWORD" TYPE=PASSWORD
MAXLENGTH=20 VALUE=*****>
Domain name: <INPUT NAME="USERDOMAIN" VALUE=%SERVERDOMAIN%
MAXLENGTH=255>
</FORM>

Press the TAB key to move between the User name, Password, and Domain
name fields.

You are connected to %SERVERNAME%
</BODY>
</OSCML>
Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
then save the file as Login.osc. The two values that you must add to the
Login.osc file instead of ***** are the user name and the password for the
client. For example, if your user name is "ristest" and your password is
"deploy," these two lines will appear as follows: &nbsp&nbspUser name:
<INPUT NAME="USERNAME" MAXLENGTH=255 TYPE=TEXT VALUE=ristest>
&nbsp&nbsp&nbspPassword: <INPUT NAME="*PASSWORD" TYPE=PASSWORD MAXLENGTH=20
VALUE=deploy><BR>

Note If you do not prestage computers in your environment, the user name
that you create for RIS must have both of the following permissions:
? Read
? Create Computer Objects

c. Install.osc <OSCML>
<META KEY=ESC ACTION="REBOOT">
<META KEY=ENTER ACTION="REBOOT">
<META ACTION=AUTOENTER>
<TITLE> Client Installation Wizard
Installation Information</TITLE>
<FOOTER> [ENTER] continue</FOOTER>
<BODY left=5 right=75>

The following settings will be applied to this computer installation.
Verify these settings before continuing.

Computer account: %MACHINENAME%

Global Unique ID: %GUID%

Server supporting this computer: %SERVERNAME%

To begin Setup, press ENTER. If you are using the Remote Installation
Services boot floppy, remove the floppy
disk from the drive and press ENTER to continue.
</BODY>
</OSCML>

Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
then save the file as Install.osc. When you add "META ACTION=AUTOENTER" to
this code, the user does not have to press ENTER in the Client Installation
Wizard because this action is automated.
d. Warning.osc <OSCML>
<META KEY=ENTER HREF="INSTALL">
<META KEY=ESC HREF="CHOICE">
<META KEY=F3 ACTION="REBOOT">
<META SERVER ACTION="WARNING">
<META ACTION=AUTOENTER>
<TITLE> Client Installation Wizard
Caution</TITLE>
<FOOTER> [ENTER] continue [ESC] cancel [F3]
restart computer</FOOTER>
<BODY left=5 right=75>

<FLASH>
<PRE>
* * * C A U T I O N * * *
</PRE>
</FLASH>

<BOLD>
<PRE>
All data on the hard drive will be deleted!
</PRE>
</BOLD>

Before the new operating system is installed, this computer's hard drive
must be repartitioned
and formatted. All existing data on the drive will be deleted during
this process.

To continue, press ENTER. To cancel the installation, press ESC.
</BODY>
</OSCML>
Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
then save the file as Warning.osc. When you add "META ACTION=AUTOENTER" to
this code, the user does not have to press ENTER in the Client Installation
Wizard because this action is automated.

4. Set the Group Policy to allow only automatic RIS setup installations.
To do this, follow these steps:
a. Click Start, point to All Programs, point to Administrative Tools, and
then click Active Directory Users and Computers.
b. Right-click your domain or the organizational unit where the policy
that you want to edit is applied, and then click Properties.
c. Click the Group Policy tab.
d. Click Default Domain Policy, and then click Edit.
e. In the left pane, expand User Configuration, and then expand Windows
Settings.
f. Click Remote Installation Services.
g. In the right pane, double-click Choice Options.
h. In the Choice Options Properties dialog box, select the following
options:
? Under Automatic Setup, click Disabled .
? Under Custom Setup, click Disabled .
? Under Restart Setup, click Disabled .
? Under Tools, click Enabled .
Then click OK.
i. Close the Group Policy Object Editor, and then click OK in the
Properties box for your domain.

Creating an ASR backup set
To create an ASR backup that is set to a tape backup or to create an ASR
backup that is set to the \\RISserver\Reminst\Setup\English\Images\
ASRImageName folder as Asr.bkf by using the Backup utility in Windows
Server 2003, follow these steps:
1. Create a new Windows Server 2003 CD-based image on the RIS server, and
name the image folder the same as the corresponding computer name.
2. On the computer that performs the ASR backup, map network drive Z to
the folder on the RIS server that contains the image that you created. When
you restore the image with ASR later, it automatically locates the correct
files from the Asr.sif file and the Mapdrv.cmd file on network drive Z. For
example, map the \\RISserver\Reminst\Setup\English\Images\ ASRImageName
folder to network drive Z on the computer where the ASR backup is
performed.
3. Click Start, point to All Programs, point to Accessories, and then
click Backup.
4. To create an ASR backup set in the Backup or Restore Wizard, do one of
the following

Note By default, the Backup or Restore Wizard starts, unless it is
disabled.
a. To create an ASR backup set in the Backup or Restore Wizard, click to
select All information on this computer in the What do you want to backup?
area.
b. If the Backup or Restore Wizard is disabled, create an ASR set in
Advanced Mode. In the Backup Utility dialog box, click ASR Wizard on the
Tools menu, and then follow the instructions that appear on your screen.

Installing the new build image on the RIS server
Note You must first create a CD-based image of the operating system that
you want to use for ASR. In all cases with RIS images, you must create a
CD-based image that provides backup files for subsequent RIPrep, ASR, or
WinPE images that you might create. Therefore, for every operating system
that you use for ASR, RIPrep, or WinPE images, you must have a CD-based
image that corresponds to the binary version of that operating system. For
example, you might need an image that corresponds to Windows Server 2003,
Windows Server 2003 Service Pack 1, and so on. To install the new build
image on the RIS server, follow these steps:
1. Click Start, and then click Run.
2. Type risetup.exe , click OK, and then follow the steps to complete the
wizard.

Note If this is a clean install of the volume that contains the build
images, set the Tool.osc file so that the Tools image (Tools.osc) can be
selected automatically. This can be done in either of the following two
ways: a. If there is only one Tools image on the RIS server, remove the
"NOAUTO" text from the default Tools.osc file.
b. If there is more than one Tools image, leave the "NOAUTO" text
unchanged . The following OSCML section from the default Tools.osc file
shows where the "NOAUTO" text is located: <OSCML>
<META KEY=F3 ACTION="REBOOT">
<META KEY=F1 HREF="TOOLSHLP">
<META KEY=ESC HREF="CHOICE">
<META SERVER ACTION="ENUM TOOLS CMDCONS">
<TITLE> Client Installation Wizard
Tools</TITLE>
<FOOTER> [ENTER] continue [ESC] go back [F1] help [F3] restart
computer</FOOTER>
<BODY left=5 right=75>
<BR>
<BR>
Use the arrow keys to select one of the following options:
<BR>
<P left=8>
<FORM ACTION="LAUNCH">
<SELECT NAME="SIF" NOAUTO SIZE=12>
%OPTIONS%
</SELECT>
</FORM>
</P>
<BOLD>Description:</BOLD>&nbsp&nbsp
<TIPAREA>
</BODY>
</OSCML>


If this is not a clean install of the volume that contains the build images
or if the Tool.osc file has been modified, you must select the Select old
menu screens option during RIS setup to make sure that the Tool.osc file is
not overwritten.
3. Copy the build image to a new name in the current folder. The name of
the new image folder is not important, but it will be used to identify
where bits are copied in the future. For example, the first image is
located in E:\RemoteInstall\Setup\English\Images\Win.Net¨CADS , and the
copied image is located in E:\RemoteInstall\Setup\English\Images\
ASRComputerName BK-ADS.

Note When you copy the CD-based image, you do not want to modify the image
that is required for the backup files. Therefore, you must copy the
CD-based image into a new folder and use the following naming convention to
rename the image:

ASR ComputerName operating_system_version

ASR indicates that this image is used for an ASR. ComputerName identifies
the exact computer that this ASR backup/disaster recovery image belongs to.
(Because ASR images are computer-specific, the images can only be used for
the computer installation that they were originally created from). OSVer
specifies the operating system version for this image.
4. Update the Ristndrd.sif file that is located in the
\\RISserver\Reminst\Setup\English\Images\ASR ComputerName-OSVer
\i386\Templates folder so that the copied image supports ASR, and then
rename the file Asr.sif. Do not confuse this Asr.sif file with the actual
Asr.sif file that the Windows Server 2003 Backup utility generates.

Note Modify the Ristndrd.sif answer file in the newly created ASR
ComputerName-OSVer image folder, not in the CD-based image folder that you
originally created by using the Risetup.exe tool and copied from.

The following sample Asr.sif file contains the specific changes that you
must make to the [OSChooser] section to support a Tools (ASR) image: [data]
floppyless = "1"
msdosinitiated = "1"
OriSrc = "\\%SERVERNAME%\RemoteInstall\%INSTALLPATH%\%MACHI NETYPE%"
OriTyp = "4"
LocalSourceOnCD = 1

[SetupData]
OsLoadOptions = "/noguiboot /fastdetect"
SetupSourceDevice =
"\Device\LanmanRedirector\%SERVERNAME%\RemoteInsta ll\%INSTALLPATH%"

[Unattended]
OemPreinstall = no
FileSystem = LeaveAlone
ExtendOEMPartition = 0
TargetPath = \WINDOWS
OemSkipEula = yes
InstallFilesPath =
"\\%SERVERNAME%\RemoteInstall\%INSTALLPATH%\%MACHI NETYPE%"
LegacyNIC = 1

[UserData]
FullName = "Microsoft Corporation"
OrgName = "Microsoft Corporation"
ComputerName = %MACHINENAME%
ProductID = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"

[GuiUnattended]
OemSkipWelcome = 1
OemSkipRegional = 1
AdminPassword = "Storage12"
AutoLogon = yes
AutoLogonCount = 1000
TimeZone = 4

[LicenseFilePrintData]
AutoMode = PerSeat

[GuiRunOnce]


[Display]
BitsPerPel = 16
XResolution = 800
YResolution = 600
VRefresh = 60

[Networking]
[NetServices]
MS_Server=params.MS_PSched

[Identification]
JoinDomain = %MACHINEDOMAIN%
DoOldStyleDomainJoin = Yes

[RemoteInstall]
Repartition = yes
UseWholeDisk = yes

[OSChooser]
ASRFile=asrpnpfiles\%guid%.sif
ASRINFFile=\Device\LanmanRedirector\%SERVERNAME%\R emoteInstall\ASRFiles\%gui
d%.sif
Description ="ASRMachineName-2003-ADS(Backup-Date)"
Help ="This image Restores and ASR backup image of Operating System for
Dated date "
LaunchFile = "%INSTALLPATH%\%MACHINETYPE%\templates\startrom.co m"
ImageType = "ASR"
Version="5.1 (0)"

[Components]
;ApplicationServer = OFF
;iis_common = ON
;iis_inetmgr = ON
;iis_pwmgr = ON
;iis_www = ON
;iis_ftp=on
;iis_htmla=on
;iis_nntp=on
;iis_smtp=on


5. Create an ASRFiles folder and an ASRPNPFiles folder, and then copy
Asr.sif and Asrpnp.sif to them. To do this, follow these steps:
a. Create the ASRFiles folder and the ASRPNPFiles folder in the
RemoteInstall folder on the RIS server. For example, create the following:
? E:\RemoteInstall ? ASRFiles
? ASRPNPFiles


b. Copy the Asr.sif file from the ASR floppy disk to the ASRFiles folder.
c. Copy the Asrpnp.sif file from the ASR floppy disk to the ASRPNPFiles
folder.
d. Determine the matching GUID by following one of these steps:
? Open Active Directory Users and Computers, and then locate the GUID for
the domain account that was created.
? Start a PXE boot of the client computer, and then select a CD-based image
install. After this install starts, locate the RemoteInstall\Tmp folder and
notice that the Ristndrd.sif has been copied and renamed to the client
computer's GUID.sif in the RemoteInstall\Tmp folder.
? Use the Microsoft Visual Basic scripting method to locate the GUID. For
additional information about this method, click the following article
number to view the article in the Microsoft Knowledge Base:
302467 How to prestage a RIS client computer using ADSI

e. Rename the \\RISserver\Reminst\ASRFiles\Asr.sif file and the
\\RISserver\Reminst\ASRPNPFiles\Asrpnp.sif file to the GUID that is
assigned to the client computer. For example, if the GUID in the
RemoteInstall\Tmp folder is 0000000000000000009879o689756, rename the
Asr.sif file 0000000000000000009879o689756.sif.

Note The Asr.sif file and the Asrpnp.sif file must match the GUID of the
client computer that is being restored. If the GUID does not match, you
receive an error message that states that the setup program cannot find the
sif files that are located in the ASRFiles folder or in the ASRPNPFiles
folder. This error message references the GUID.sif file.

6. Edit the Asr.sif file that you renamed to include the GUID that is
located in the ASRFiles folder. Add a command line to the Commands section
to map the \\RISserver\Reminst\Setup\English\Images\ASRWINNET ADSRC1 drive
after the network is loaded. To do this, follow these steps.

Note Do not perform this step if you are restoring from a tape backup.
a. Create a batch file named Mapdrv.cmd that includes the following
command: net use z:
\\risnet1\reminstv\setup\english\images\asrwinneta dsrc1 Password1
/USER:risnet1\administrator

b. Create an $oem$\C folder in the ASR ComputerName-OSVer \ folder.
c. Copy the Mapdrv.cmd file to the ASR ComputerName-OSVer \$oem$\C folder.

d. Edit your Ristndrd.sif file to set OEMPreinstall=Yes.
e. Edit your Asr.sif file to call the Mapdrv.cmd as follows: [COMMANDS]
1=1,3000,0,"%SystemRoot%\system32\asr_fmt.exe","/restore"
2=1,4990,1,"%SystemRoot%\system32\asr_pfu.exe","/restore"
3=1,2000,1,"%SystemRoot%\system32\asr_ldm.exe","/restore"
4=1,3990,0,"%SystemRoot%\system32\cmd /c c:\mapdrv.cmd"
5=1,4000,1,"ntbackup","recover /1"

Hope this helps.

Mike Luo

Microsoft Online Partner Support
0
 
AlwaysAlertAuthor Commented:
I'm sorry, but i'm only looking to automating the backup of a server using the ASR process. Instead of using the ntbackup wizard to make an ASR, i would like to script it and run it as a scheduled job. I'm referring to the backup process, not restore

Please help
Thanks
0
 
AlwaysAlertAuthor Commented:
Also one more question regarding the ASR, the exclude files option in the ntbackup utility, does that apply to ASR? Will that exclude the files/directories while making an ASR as well?

Always Alert
0
 
Bradley HaynesCommented:
Here is a link to a tool that may assist you: http://www.unsupportedthoughts.com/automatic_asr/automatic_asr_1.1.html
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now