Forum Discussion

AIacono's avatar
AIacono
Level 3
10 years ago

How to use scripts to backup many folders

Hi, We need to perform a backup using some scripts (like pre post command). This is our Netbackup Infrastructure: MasterServer: Windows Server 2008 R2 with Veritas Cluster (NB7.5.0.7) Med...
  • Marianne's avatar
    10 years ago

    Best to create a script on Linux Client that will do everything in your list, then use crontab to kick off the script.
    Add a User schedule in the policy with open window when user backups will be allowed.
    No need for anything in Backup Selection or start_ or end_notify scripts.

    1. Pre-backup script (Set DB with backup mode)
      (call script or add commands here)
    2. backup of db configuration folder -
      /usr/openv/netbackup/bin/bpbackup <folder-name>
    3. When first backup is finished a script must be executed (Stop data stream to index)
    4. Wait 30 sec 
      sleep 30
    5. Backup of data stream folder
      /usr/openv/netbackup/bin/bpbackup <folder-name>
    6. When second backup is finished another script must be executed to end backup procedure (Start data stream and unset backup mode on DB)
      (call script or add commands here)

     

    PS:
    Any reason why you do not want to or cannot use NBU agents for this DB?

  • Marianne's avatar
    10 years ago

    -f option needs a filename as argument.
    This file will contain the list of folders/filenames to be backed up.

    If folder list is specified as part of the command, it must be last in the command.

    So, your command need to look like this:

    /usr/openv/netbackup/bin/bpbackup -f /path/filename -p policy_name -s schedule_name 

    or

    /usr/openv/netbackup/bin/bpbackup  -p policy_name -s schedule_name /folder1 /folder2 /folder3  

    See  NetBackup Commands Reference Guide  for command usage.