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 Sybase Administrator's Guide
  3. Configuring NetBackup for Sybase
  4. About the backup, restore, and load scripts for NetBackup for Sybase on Windows
  5. sybase_mdb_backup.cmd script
Veritas NetBackup™ for Sybase Administrator's Guide

sybase_mdb_backup.cmd script

The sybase_mydb_backup.cmd script is as follows:

@setlocal
@echo off
  
@REM **************************************************************************
@REM Replace C:\Sybase below with your actual Sybase home directory 
@REM **************************************************************************
@set SYBASE=C:\Sybase
  
@REM **************************************************************************
@REM Replace Sybase below with the actual name of your SQL Server
@REM **************************************************************************
@set SYBSERVER=SYBASE
  
@REM **************************************************************************
@REM Replace SYB_DB below with the actual name of your Sybase database
@REM **************************************************************************
@set DATABASE_NAME=SYB_DB
  
if "%SYBASE_OCS%" == "" goto notsyb12
@REM ********* Sybase 12.0 or later ***********
@set OCS_QUAL=\%SYBASE_OCS%
goto cont1
  
:notsyb12
@REM ********* Sybase 11.9.2 or earlier **********
@set OCS_QUAL=
  
:cont1
  
@REM **************************************************************************
@REM These environment variables are set by NetBackup.  
@REM **************************************************************************
@echo SYBACKUP_SERVER = %SYBACKUP_SERVER%
@echo SYBACKUP_POLICY = %SYBACKUP_POLICY%
@echo SYBACKUP_SCHED = %SYBACKUP_SCHED%
@echo SYBACKUP_SCHEDULED = %SYBACKUP_SCHEDULED%
@echo SYBACKUP_USER_INITIATED = %SYBACKUP_USER_INITIATED%
  
@REM **************************************************************************
@REM Replace "database_dump" below with your actual NetBackup schedule name
@REM which is used for a full backup of the Sybase database.
@REM **************************************************************************
if  "%SYBACKUP_SCHED%" == "database_dump" goto dbdump
  
@REM *********** NetBackup has started a "transaction_dump" backup ***********
set DUMP_TYPE=TRANSACTION
       goto entercmd
  
:dbdump
@REM *********** NetBackup has started a "database_dump" backup ***********
set DUMP_TYPE=DATABASE
  
:entercmd
  
@REM **************************************************************************
@REM Replace "Default-Application-Backup" below with your actual NetBackup 
@REM Application Backup type schedule name for the Sybase database.
@REM **************************************************************************
  
@echo dump %DUMP_TYPE% %DATABASE_NAME% to "sybackup::-SERV %SYBACKUP_SERVER% -POL 
%SYBACKUP_POLICY% -SCHED Default-Application-Backup -STAT_FILE %STATUS_FILE%" > .
\syb_%DATABASE_NAME%_dump
  
@REM **************************************************************************
@REM Remove the REM from the beginning of the line below if you are going to
@REM use multiple stripes for the backup. Repeat this line for each stripe.
@REM Replace "Default-Application-Backup" below with your actual NetBackup 
@REM Application Backup type schedule name for the Sybase database.
@REM **************************************************************************
@REM echo stripe on "sybackup::-SERV %SYBACKUP_SERVER% -POL %SYBACKUP_POLICY% -SCHED 
Default-Application-Backup -STAT_FILE %STATUS_FILE%" >> .\syb_%DATABASE_NAME%_dump
  
@echo go >> .\syb_%DATABASE_NAME%_dump
  
  
  
  
@REM **************************************************************************
@REM Replace "manager" with your Sybase server Administrator's Password
@REM **************************************************************************
  
set CMD_LINE=%SYBASE%%OCS_QUAL%\bin\isql -Usa -Pmanager -I%SYBASE%\ini\sql.ini 
-S%SYBSERVER% -i .\syb_%DATABASE_NAME%_dump
  
@echo %CMD_LINE%
%CMD_LINE%
  
  
@REM **************************************************************************
@REM This script will return an error status back to the NetBackup client if
@REM the isql command fails.
@REM **************************************************************************
  
if errorlevel 0 goto end
echo Execution of isql command failed - exiting
if "%STATUS_FILE%" == "" goto end
if exist "%STATUS_FILE%" echo 1 > "%STATUS_FILE%"
  
:end
@echo on
@endlocal

More Information

NetBackup for Sybase configuration or bp.conf file settings

Feedback

Was this page helpful?
Previous

Modifying the backup script for NetBackup for Sybase on Windows

Next

Additional information for editing the backup script for NetBackup for Sybase on Windows

Feedback

Was this page helpful?