cancel
Showing results for 
Search instead for 
Did you mean: 

how to trigger a script from NBU admin console

kkhoo
Level 5

HI,

We have a written a script in the client that does the following:

- search for 60 days old files; copy to backup directory; trigger backup

Other than i schedule this the client's cron; can i call the same script in NBU?

Backup Selection > script.sh

Please advise, thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

You can execute scripts on the client by calling them with bpstart_notify. When a backup runs it will look for the bpstart_notify file. If it finds it, it will execute it before the backup runs.

What you could do is setup the folder that you'd like to backup as the backup selection, and use bpstart_notify to copy the files you want into this folder before backing it up.

Below are windows/unix style instructions.

https://www.veritas.com/support/en_US/doc/24437881-126559615-0/v41507330-126559615

https://www.veritas.com/support/en_US/doc/24437881-126559615-0/v41507383-126559615

View solution in original post

6 REPLIES 6

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

You can execute scripts on the client by calling them with bpstart_notify. When a backup runs it will look for the bpstart_notify file. If it finds it, it will execute it before the backup runs.

What you could do is setup the folder that you'd like to backup as the backup selection, and use bpstart_notify to copy the files you want into this folder before backing it up.

Below are windows/unix style instructions.

https://www.veritas.com/support/en_US/doc/24437881-126559615-0/v41507330-126559615

https://www.veritas.com/support/en_US/doc/24437881-126559615-0/v41507383-126559615

VirgilDobos
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi mate,

You could use bpstart and bpend to trigger the script. Then, once the script completes, you may schedule another backup policy to backup the collected files.

Have a look on this article: https://www.veritas.com/support/en_US/article.TECH162973

Just saw Riaan already replied on this with the same indication.

 

--Virgil

Hi there,

Thanks for reply. I have no access to the client. We wanted to standardize in a way that the script is being triggered in NBU.This way we can monitor which backup has failed.

I remember in older version, the script can be triggered under backup selection. Please advise, thanks.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Scripts can still be triggered in Backup Selection, but only for database policy types, and is triggered on the client.
It has been like this since I first got to know NBU (19 years ago, NBU 3.1.)

You will need to work with the server owner to create and run a script on the client.

Systems_Team
Moderator
Moderator
   VIP   

Hi Kkhoo,

There are quite a few good options for you to choose from the suggestions that have been posted so far.

One other option would be to keeps the steps "search for 60 days old files; copy to backup directory" as a CRON triggered script on the client.  Just Make sure the files are copied to the backup directory prior to the backup kicking off. 

Then trigger the backup normally via a schedule in your NetBackup policy, with your backup selection being your "backup directory".  You will at least have visibilty of the actual backup job in NetBackup, you just won't have visibility of the first two steps that run on the client.

Hope this helps,

Steve

Hi Systems_Team,

Currently this is in-placed. However, a lot of times, our tapelib has issue. Backup start to fail. So we know which backup fails.

But for those that is triggered from client, we used to missed those backup jobs. Thus we are looking at controlling everything in NBU.

@Marianne, yeah i realized i was referring to those rman scripts can be triggered from backup selections.