09-03-2012 08:24 AM
Hi all,
I am stuck on pre and post-command setup on Backup Exec 2010 R3.
Basically we are replicating some servers using Double-Take, and one of our file servers is not replicating properly. It seems that BackupExec modifies the file attributes and Double-Take re-replicate the whole file againflooding the disk queue.
Anyway, they gave me a couple of powershell scripts to run on the backup jobs.
At the moment i am trying on a test VM to run a simple backup using these ps1 scripts. (BE agent is installed on test VM).
In the backup jobs properties I setup the following:
pre-command: c:\tmp\On.bat
post-command: c:\tmp\Off.bat
Options selected:
- Run job only if pre-command is successfull
- Run post-command only if pre-command os successfull
Run these commands: On each server backed up
Batch files:
On.bat
powershell.exe -NonInteractive -NoLogo c:\tmp\attrib_on.ps1
Off.bat
powershell.exe -NonInteractive -NoLogo c:\tmp\attrib_off.ps1
Basically nothing happens, therefore I believe the powershell scripts does not run.
Help is much appreciated
09-03-2012 08:41 AM
pre- and post commands do not apply to Agent for Vmware (AVVI backups)
You have to edit the pre-freeze and post-thaw files inside the VM's themselves (sorry I don't have the exact file names handy, but they are either .cmd or .bat and sit in the C:\windows folder.)
09-04-2012 01:18 AM
Hi Colin,
I have pushed the Remote Server agent and I am trying to backup a couple of files rather than vmdks.
When you say I have to edit the pre-freeze and post-thaw files could you please comment further as I do not know what I exactly need to do?
Help is much appreciated
09-04-2012 01:38 AM
Pre- and post commadn in the Backup Exec Job configuration only apply to backusp that make use of the standard remoet agent. Setting these options (along with run command on each system being backed up) will have no effect on an AVVI backup because the backup process uses a request to vStorage to do the backup and does not touch RAWS (There is a minor excpetion if performaing Applictaion GRT backups, where RAWs does gather somemeta data)
Hence you are correct the scripts do not run at all the way you have to configured.
The basic way an AVVI backup works is
1) Backup Starts
2) BE requests a Snapshot from ESX itself of the Virtual Machine
3) ESX starts the snapshot process and talks into the Virtual Machien via the installed VMware tools to requests that VSS inside the VM does a quiesce operation on all disks. As part of this quiesce operation, a script file is called to allow customization of the operation
4) VMware tools reports back to ESX that the VSS operations are complete.
5) ESX then tells Backup Exec that the snapshot is ready and provides the details of the snapshot to BE.
6) BE then backs up the snapshot.
7) When the backup is complete the process is reversed (including another script being called by VMware tools to undo the VSS operation inside the VM.
Hence to do a Pre and Post command on the system being backed up when AVVI backups are being run you have to edit the script files I mentioned in Steps 3 and 7 and add you custom commands to these files. Note add your lines do not remove any existing ones.
This document sort of applies even though written for ESX 3.5.
http://www.symantec.com/business/support/index?page=content&id=TECH63718
09-04-2012 01:47 AM
Hi Colin,
Thanks for your reply again...
I will check the link you provided....
Again, I am trying to backup 2 test files using RAWS (remote server agent) rather than the whole vmdk file.
Do I still need to go this route????
Thanks again
09-04-2012 03:27 AM
Nope you don't AVVI backs up at VMDK level but can give restore capability over indiviual files with the VMDK once the backup is complete (using Granular Recovery)
A RAWS only backup would give you ability to backup just the files you want but would not give a DR capability (or would have a more complicated DR capability depending on what you then select to backup). But then would give pre and post command sworking with the job configuration instead of needing to follow the document I provided.
09-04-2012 03:33 AM
Hi Colin,
That is why I am confused....
I am trying to use RAWS to backup a couple of test files and find out whether these poweshell scripts work, then I can edit the job on the production server which is also done using RAWS (backing up volumes).
I would really appreciate if you could confirm how to set this up correctly as I had originally done on Pre/post Commands area, but it failed.
Help is much appreciated
09-04-2012 04:59 AM
Ok I mentioned the VMware pre-post requirements as I was not sure what type of backup you were doing and it might have been your answer. If you are doing standard RAWS backups then I am not sure why the commands will not run, I assume however that
1) you are copying your batch files (and PS1 files) to the remote servers
2) have got powershell installed on both remote servers
3) have at least local administrator permission over both remote servers against the account configured in the backup job.
4) Have tried logging in locally on the remote servers using the account configured in the backup job and then have tried to run the batch files manually to check the security access.
5) Have disabled UAC on the remote servers (it is possible this might be getting in the way)
6) have tried adding an echo to file statement into your batch files so you can prove they are starting (or not)
i.e. for your on.bat make it contain:
echo On_File_Started >c:\tmp\on_test.txt
powershell.exe -NonInteractive -NoLogo c:\tmp\attrib_on.ps1
and in your off.bat make it contain
echo Off_File_Started >c:\tmp\off_test.txt
powershell.exe -NonInteractive -NoLogo c:\tmp\attrib_off.ps1
as this allows you to check whether the files are called by creating a txt file when it runs. make sure you delete the txt files if testing this more than once (or study the dates/times of the files)
09-04-2012 07:46 AM
Hi Colin
It seems that it works now, by copying batch files to remote servers, which I had not done so and was hoping by miracle it would work.
Tonight will be the big test.
Thanks so far for your support.