Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for SAP Administrator's Guide
  3. Configuring NetBackup for SAP
  4. NetBackup for SAP backup scripts
  5. Example NetBackup for SAP backup script (UNIX)
Veritas NetBackup™ for SAP Administrator's Guide

Example NetBackup for SAP backup script (UNIX)

For example, the sap_offline_backup script contains the following lines:

#!/bin/sh
#
#NOTE:IF your SAP user (in this script orasap) runs in C shell, environmental
#variables can not be exported. In that case, you should modify this script to
#work in your environment. For example:
#   SAP_SERVER=$SAP_SERVER; export SAP_SERVER; (Correct for Bourne and Korn shells)
#   can change into
#   setenv SAP_SERVER $SAP_SERVER; (Correct for C shell)
#
  
#
#This environment variable are created by NetBackup (bphdb)
#
  
echo "SAP_SCHEDULED = $SAP_SCHEDULED"
echo "SAP_USER_INITIATED = $SAP_USER_INITIATED"
echo "SAP_SERVER = $SAP_SERVER"
echo "SAP_POLICY = $SAP_POLICY"
  
RETURN_STATUS=0
  
SAP_ENV=""
#
# If SAP_SERVER exists then export it to make it available to backint
#
if [ -n "$SAP_SERVER" ]
then
        SAP_ENV="$SAP_ENV SAP_SERVER=$SAP_SERVER; export SAP_SERVER;"
#if Oracle DBA account( orasap user) uses C Shell, comment the above line and
#uncomment next line
#       SAP_ENV="$SAP_ENV setenv SAP_SERVER $SAP_SERVER;"
fi
  
#
# If SAP_POLICY exists then export it to make it available to backint
#
if [ -n "$SAP_POLICY" ]
then
        SAP_ENV="$SAP_ENV SAP_POLICY=$SAP_POLICY;export SAP_POLICY;"
#if Oracle DBA account( orasap user) uses C Shell, comment the above line and
#uncomment next line
#       SAP_ENV="$SAP_ENV setenv SAP_POLICY $SAP_POLICY;"
fi
  
#
# Full offline backup
#
  
CMD_LINE="$SAP_ENV brbackup -c -d util_file -t offline -m all"
  
#
# The username on the "su" command needs to be replaced with the correct
# user name.
#
echo "Execute $CMD_LINE"
su - orasap -c "$CMD_LINE"
  
RETURN_STATUS=$?
  
exit $RETURN_STATUS

Feedback

Was this page helpful?
Previous

Example NetBackup for SAP backup script (Windows)

Next

NetBackup for SAP backup script parameters

Feedback

Was this page helpful?