Forum Discussion

Katy2010's avatar
15 years ago

windows batch file for starting Netbackup job

Can anybody please give me a script which  starts the backup by calling specific netbakup policy. The server is windows based server and it needs the backup to be started after a specific activity gets completed. Please help me to get this script.

3 Replies

  • Where will the backup be initiated from? Client or master?

    If master, you can use 'bpbackup -i' (same as right-click on a policy and select Manual Backup) e.g.:

    <install-path>\veritas\netbackup\bin\bpbackup -i -p <policy-name> -s <schedule> -h <client-name> -L <logfile>

    The schedule needs to be automatic type schedule (Full, Cum_Inc or Diff_Inc). The policy Backup Selection will be used.

    If initiated from client:

    <install-path>\veritas\netbackup\bin\bpbackup -p <policy-name> -s <schedule> -f <listfile> | <filenames> -L <logfile>

    File/path name(s) can either be specified as part of the command or added to a filename, specified by -f option. The schedule needs to be User type and needs an open window during which user type backups are allowed.  The policy Backup Selection will be ignored.

  • bpbackup also takes a -t argument for the policy type.  An MS-Windows-NT policy is type 13.  If policy happened to use FlashBackup-Windows, you'd want to specify type 29.  There are other special types for other application-style backups (Exchange, MS SQL, etc.)

     

    To test your script, create a policy with a very simple file list like C:\WINDOWS\system and work with that.  Write it to a disk staging unit with a very short retention (1 day) and you can quickly ensure you have the right arguments.