cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup backup exec to automate snapshot using pre/post command?

no_name1
Level 5
Certified

I could not run the script if i used pre/post command on backup exec but the script works if I used it manually on command line. Can anyone provide me some solution? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

If you use the NDMP option in Backup Exec it snaps the volume for you so why are you complicating things by trying to use an external script?

 

View solution in original post

10 REPLIES 10

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

As Backup Exec uses snapshots itself, what type of data are you backing up which needs a pre-post commend to deal with snapshots?

 

With regards you issue

1) The Backup Exec Service accounts must have the correct permissions and not have any of them blocked by Group Policy

2) You have to make sure thet the pre-post command is being run on the correct server (as BE allows it to run on either BE server or remote server)

2) try put and echo to output file commands in your script that records both that the script tried to run and the date - then you be able to tell if the script is being called or not - if it is being called you may need to add pipe commands to the ends of your individual script commands to record the status of each command into an output file of some kind

We're trying to automate the snapshot using the pre-post command here's the script that we used --> c:\Putty\plink.exe -ssh (user@netapphostIP) "snap create VOL_test VOL_test-snap" not really sure if plink  can recognize by backup exec to ssh on netapp device.

no_name1
Level 5
Certified

Running the script manually on backup exec server work fine but when we add the script to pre command it doesn't work.

Riyaj_S
Moderator
Moderator
Employee Accredited Certified

Copy the command which you want to run in a .bat file.

( see this page for more details on how to create .bat file : http://gobruen.com/progs/dos_batch/dos_batch.html )

Once created, call this .bat file in pre-post command. for e.g.  - "C:\prejob.bat"  (check screenshot from following technote)

http://www.veritas.com/docs/000025019

no_name1
Level 5
Certified

Already save the script as bat file but still doesn't work..

So just want to clarify, where should be the bat file save is it on media server or in netapp device?

our goal is to  create snapshot using pre command then after that BE will backup to tape the snapshot. Once backup to tape completed it will automatically delete the snapshot using the post command.

Riyaj_S
Moderator
Moderator
Employee Accredited Certified

There is one option called "Run these commands" in pre-post commands : you should choose "on this Media Server"  and save the script on the local disk. Specify the same path in the job.

e.g. "c:\prejob.bat"

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

If you use the NDMP option in Backup Exec it snaps the volume for you so why are you complicating things by trying to use an external script?

 

no_name1
Level 5
Certified

 Already extend to maximum queue time (300) but still got time out error when I run the job.

Starting Pre Job Command < c:\Putty\test2.bat >
V-79-57344-33232 -
Error: Pre Job Command did not complete in time.

Error: Pre Job Command < c:\Putty\test2.bat > Canceled.

how to do that? I am using BE2012 version

Colin_Weaver
Moderator
Moderator
Employee Accredited Certified

Suggest you

a) Get off BE 2012 as it is End of Support as of May this year

b) Read up on the NDMP option and how to use it (and possibly invest in an appropriate license if not already owned)