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 (Windows)
Veritas NetBackup™ for SAP Administrator's Guide

Example NetBackup for SAP backup script (Windows)

This topic includes an example backup script that was created for Windows.

For example, the sap_offline_backup.cmd script contains the following lines:

@REM
@REM $Header: sap_offline_backup.cmd,v 1.2 2002/11/20 00:47:59 $
@REM
@echo off
  
REM 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%
  
REM ---------------------------------------------------------------------------
REM Replace cer below with the Oracle SID of the target database.
REM ---------------------------------------------------------------------------
  
set ORACLE_SID=cer
  
REM ---------------------------------------------------------------------------
REM Replace c:\oracle below with the Oracle home path.
REM ---------------------------------------------------------------------------
  
set ORACLE_HOME=c:\oracle
  
REM ---------------------------------------------------------------------------
REM Replace C:\oracle\CER with SAPData Home Path
REM ---------------------------------------------------------------------------
  
set SAPDATA_HOME=C:\oracle\CER
  
REM ---------------------------------------------------------------------------
REM Replace path with the correct sap archive path.
REM ---------------------------------------------------------------------------
  
set SAPARCH=%SAPDATA_HOME%\saparch
  
REM ---------------------------------------------------------------------------
REM Replace path with the correct sap backup path.
REM ---------------------------------------------------------------------------
  
set SAPBACKUP=%SAPDATA_HOME%\sapbackup
  
REM ---------------------------------------------------------------------------
REM Replace path with the correct sap reorg path.
REM ---------------------------------------------------------------------------
  
set SAPREORG=%SAPDATA_HOME%\sapreorg
  
REM ---------------------------------------------------------------------------
REM Replace path with the correct Path to  Brtools
REM ---------------------------------------------------------------------------
  
set SAPEXE=C:\usr\sap\%ORACLE_SID%\sys\exe\run
  
REM ---------------------------------------------------------------------------
REM Replace path with the correct BRBACKUP path.
REM ---------------------------------------------------------------------------
  
set BRBACKUP=c:\usr\sap\%ORACLE_SID%\sys\exe\run\brbackup
  
REM Full offline backup
  
set CMD_LINE=%BRBACKUP% -u internal/ -c -d util_file -t offline -m all
%CMD_LINE%
  
REM ---------------------------------------------------------------------------
REM To communicate with NetBackup's job monitor for an automatic schedule
REM a "STATUS_FILE" variable is created by NetBackup (bphdb) that contains
REM a path to a file.  This file is check by NetBackup to determine if the
REM automatic schedule was successful.  It is up to the script to write
REM a 0 (passed) or 1 (failure) to the status file to communicate to NetBackup
REM the status of the execution of the script.  The following code echo a 0
REM to %STATUS_FILE% if succcessful and echo a 1 to %STATUS_FILE% for a
REM failure.
REM ---------------------------------------------------------------------------
  
if errorlevel 1 goto errormsg
echo BRBACKUP successful
if "%STATUS_FILE%" == "" goto end
if exist "%STATUS_FILE%" echo 0 > "%STATUS_FILE%"
goto end
  
:errormsg
echo Execution of BRBACKUP command failed - exiting
if "%STATUS_FILE%" == "" goto end
if exist "%STATUS_FILE%" echo 1 > "%STATUS_FILE%"
  
:end

Feedback

Was this page helpful?
Previous

Modifying the NetBackup for SAP backup scripts

Next

Example NetBackup for SAP backup script (UNIX)

Feedback

Was this page helpful?