Operating System - HP-UX
1821830 Members
3727 Online
109638 Solutions
New Discussion юеВ

start/stop an app before backup in Netbackup

 
SOLVED
Go to solution
Terrence
Regular Advisor

start/stop an app before backup in Netbackup

I would like Netbackup (5.1) to stop my application before running it's backup, and then start the app when it's done.

The setup is very simple; a single server acting as its own master with a single attached tape drive.

The start and stop command is also simple; /usr/ad50/bin/stopad ( and startad). It takes just a few minutes for the app to start and stop so netbackup needs to wait while stopping.

Someone suggested using the bpstart_notify script but it appears more designed for notification purposes.

I'd also prefer to do this in the gui if possible.
3 REPLIES 3
Dave La Mar
Honored Contributor

Re: start/stop an app before backup in Netbackup

Terrence -
What you ask is relatively simple when scripted. We perform a number of tasks within a script the issue a backup command.
Our product is NetBackup Datacenter, but regardless the process would be the same.

1. Script your stop commands.
2. Check for the return code of the stop.
3. Issue the backup command.
i.e. /bpbackup -w -c $CLASS -s $SCHED -f $FILE_LIST_1
4. Check for success of the backup.
5. Issue your start command.

As mentioned, we have been doing a number of backups this way for several years.

Best of luck.

Regards,

dl

"I'm not dumb. I just have a command of thoroughly useless information."
Betty Fessler
Frequent Advisor
Solution

Re: start/stop an app before backup in Netbackup

Veritas supplies a sripting method to do this, in NB-datacenter is bpstart_notify and
bpend_notify. You run any of your shutdown scripts within the bpstart script and your startups in the bpend script. On our systems we have the bpstart_notify script deciding whether the backup is a daily_diff
Weekly Cum or Monthly Full and when its a DB backup and what type or a system backup it then executes our normal shutdown/startup scripts depending on the applications.
Rick Garland
Honored Contributor

Re: start/stop an app before backup in Netbackup

The bpstart and bpend are the files.

The bpstart will have commands to stop the application before the backup starts.

The bpend will have commands to start the application after the backup is completed.

GUIs are nice but if you are using CLI to stop/start applications for the backups, put these same commands in the bpstart/bpend files.
This is all the scripting you need to get started.

In time you can add traps and error handling to the bpstart/bpend scripts. Items such as verification the app is down. Again, how you do this from the command line can be input into the bpstart/bpend scripts.