Solved

BAckup Exec Pre and Post commands

Posted on 2009-05-11
7
1,861 Views
Last Modified: 2013-12-01
Backup Exec 12
Windows 2003 environment

I have a backup that runs nightly with about 20 servers in it.  I want to add another server to the backup but the application that is on it, EVault by Symantec requires that I run some pre and post commands that basically take the system offline during backup.  The problem is I want to just run these pre and post commands when it's that servers time to be backed up and not before and after the 8 hour backup window.  Is there anywhere do configure this?  I can only seem to find entire backup pre and post command options.

Thanks,


0
Comment
Question by:dlabbadia01
  • 4
  • 2
7 Comments
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24358587
To stop and start a service remotely, you can use a WMI vb script....  This can be launched by command line arguments. ( example... cmd /c cscript.exe C:\stopserviceonserver.vbs )

or.... you can use scheduled tasks in control panel, on the server, to stop the service locally before the backup is scheduled to begin.   ( NET STOP "{servicename}" )

0
 
LVL 38

Accepted Solution

by:
Hypercat (Deb) earned 125 total points
ID: 24358600
You can only configure one set of pre and post commands per backup job.  So, if you want to include this server in a global backup job that handles all 20 of your servers, then the commands would be processed at the beginning of that job and the end of that job.  The only way to do what you want to do is to create a separate backup job for that server.  Depending on what backup media you're using, you could schedule the job to append to the same media, but you'd have to schedule the start time of the job carefully so that it doesn't try to start before the previous job is done.
An alternate method would be to include the new server in the same backup job. However, instead of using the BE pre and post backup commands, you could simply use the Windows task scheduler to run the two commands at appropriate times relative to when the backup job would be running on that particular server.
0
 

Author Comment

by:dlabbadia01
ID: 24358605
yeah but thats not exact enough.  i was hoping to get a way of just running pre and post command on a single server within a backup containing multiple servers.  any other suggestins?  perhaps make the first  group of servers one backup with the append option and make this single server a second backup to the same tape?  thoughts on that would be appreciated.


0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24358621

stopserviceonserver.vbs
strComputer = "SERVERNAME" 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set objShare = objWMIService.Get("Win32_Service.Name='yourservicename")
Set objOutParams = objWMIService.ExecMethod("Win32_Service.Name='yourservicenameagain'", "StartService")

Open in new window

0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24358653
The pre/post commands only run before and after... there is no way to target each server just before and just after backup.
0
 
LVL 25

Expert Comment

by:Ron Malmstead
ID: 24358662
make each server it's own backup, with append... that would be the solution.
0
 

Author Comment

by:dlabbadia01
ID: 24358663
ok,

thanks all.  you'd think they would implement that feature as it seems like it could be very useful...

d
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Life is full of imperfections – we all know it. Sometimes bad things happen to people for no particular reason. As they say: “it happens”. All we can do is to find a way to make some unavoidable situations… avoidable. Every kind of hardware has i…
VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question