Start a Conversation

Unsolved

This post is more than 5 years old

5272

May 13th, 2010 01:00

Avamar backup of systemstate to a central location for many servers

We have several windows 2003 servers that need to be backed up by Avamar. Most of them are running very low space at C: (system drive). we tested backing up the system state with "systemstatefile" parameter to other drive like D: on a server.

Now we need to find a way to do this in a dataset for our environment.

One option we could think is, map a network share via pre-script and define that location at the systemstatefile like z:\temp\systemstatefile.bkf. But we need to pass some variable like systemname to this as otherwise all the servers will create same system state file !.

Any idea please?.

137 Posts

May 13th, 2010 22:00

How about running the systemstate via command line, you can create a cmd file doing the systemstate backup naming the resulting file as you want, then you can run this scripts from avamar in the prescript option, then run the backup  with avamar.

45 Posts

May 17th, 2010 10:00

I am currently testing this now and here is what we did...

My first step was I created a directory on the central server for the systemstate files each one with a delimter for the System Name.

The second step was so that Avamar could backup up the CIFS share I created an AD service account that would map the path each time.

in my instance it was the Z: --- Z: \\centralserver\systemname... I am working to try and use the %COMPUTERNAME% variable but I am having a tough go at it.

Then I modified the "Backup Agent" service to run as that service account that I created previously

then in the dataset I enabled the system state backup option then added the following advanced option

systemstatefiles=z:\systemstate.bkf

I am still playing with this. I hope to have some results soon...

18 Posts

May 17th, 2010 19:00

Great idea, Albert. I also tried quickly with the following batch file script to create and map a drive :

@echo off

if exist \\file1\temp\avasysstate\%COMPUTERNAME% goto map
echo will create dir
mkdir \\file1\temp\avasysstate\%COMPUTERNAME%
:MAP
echo will map now
net use z: /delete
net use z: \\file1\temp\avasysstate\%COMPUTERNAME%

and to include z:\sysstate.bkf

But it failed on create/map with permission issue. I am suspecting the user it runs the script is local. The script works fine on my manual run.

inserted the following :

echo USERNAME is %USERNAME% >> c:\temp\avs.log

but all i get is blank for the username.

139 Posts

May 18th, 2010 12:00

This is what I am doing, and here is a copy paste from my own documentation. I don't use the systemstatefile parameter.

If the backup needs to be scripted, then the Avamar dataset can be instructed to run a script before the backup begins. This option is found under advanced dataset options and is called pre-script. The script needs to be placed inside c:\program files\avs\etc\scripts and can only be a .bat, .vbs or .js file.  Be sure to uncheck the option underneath which says "Abort backup if script fails". If the script fails to run, there is no sense in not backing up the data.  When manually creating a system state backup, the system state and either the c:\windows\windows32 (for Windows 2003) or the c:\winnt\system32 (for Windows 2000) need to specified. The script I use is as follows:

Windows 2000 Script:

@echo off
ntbackup backup "c:\WINDOWS\system32" /m normal /f "\\servername\share\%COMPUTERNAME%.bkf"
ntbackup backup systemstate /M normal /f "\\servername\share\%COMPUTERNAME%.bkf" /a

Windows 2003 Script:

@echo off
ntbackup backup "c:\WINDOWS\system32" /m normal /f "\\servername\share\%COMPUTERNAME%.bkf"
ntbackup backup systemstate /M normal /f "\\servername\share\%COMPUTERNAME%.bkf" /a

These scripts require that a share already exist, and it should have share permissions set to allow Everyone to write. This is because Avamar agent runs as System user and this is the only option I have found to allow the System user to write to remote share.  I haven't tried running the Avamar client agent as a specific user, so I don't know if that will allow specific share level permissions. I know this is a security hole, but I don't have a work around for this.

One important thing to do when redirecting system state backups to a remote share is to create a avtar.cmd file in c:\program files\avs\var and put the following parameter in it:  --backupsystem=false.  This is important because if by mistake a different dataset is selected for a client and it does not specify that the system state should be directed to a remote share, the system state backup will be created locally.  This parameter blocks the system state backup to made using the Avamar agent.  I do this because I only enable redirecting system state backups to a remote share for clients which have very small amount of free space available locally, and if by accident the drives fill up, the client could crash.

When the client backup runs, it calls the system state backup script which creates the backup to a remote share. This remote share can then be backed up by installing the Avamar agent on that client and backing up that client last.

18 Posts

May 20th, 2010 15:00

I tried running the backup agent as a regular user. Then my earlier script worked fine (Mapping drive before backup and the backup ran the system restore to the mapped drive).

Modification of backup agent service on several systems is very big task to do !.

53 Posts

March 31st, 2011 05:00

How change, the original path of Systemstate  C:\program files\avs\var   to drive D in other temporal path, like:  D:\AvamarTempFolder

12 Posts

March 31st, 2011 15:00

I wrote some custom VBScript wrapper scripts that perform the task along with error control for me.  I'm processing about 125 servers this way and growing.  I have a script for W2K, W2K3, and W2K8.  Let me know if you are interested.

CDKotran

49 Posts

April 1st, 2011 07:00

Doesn't the latest client update for Windows 2008 do System State backups properly? It used to not be properly supported and you had to script it.

12 Posts

April 1st, 2011 08:00

From what I could read and figure out, the agent doesn't allow you to put the system state on a remote share which is why I developed the VB scripts I'm using. The scripts allow me to store the system states on a central server, rollup errors to Avamar, and rotate / cleanup excessive backups on the central server.

Did they fix something that I don't know about?

5 Posts

April 1st, 2011 11:00

CDKotran,

I would be very interested in seeig/ using your scripts. I have Windows 2000,3,8, server.  I was just about to sit down a start writing some myself but why reinvent the wheel. Many thanks in advance.

12 Posts

April 4th, 2011 08:00

I finally took some time to figure out how to properly use this CMS.  I've uploaded a zip file to the system and linked it below.  Please advise of any questions or issues that I might be able to assist with.

system_state_vb_scripts.zip

CDKotran

No Events found!

Top