Modifying the NetBackup for SAP backup scripts
This topic describes how to modify the backup scripts for NetBackup for SAP.
To modify the backup scripts
- Copy the example script(s) from one of the following director(ies) to a different location on your client.
UNIX or Linux:
/usr/openv/netbackup/ext/db_ext/sap/scripts/sap_oracle /usr/openv/netbackup/ext/db_ext/sap/scripts/sap_maxdb
Windows:
install_path\NetBackup\DbExt\SAP\samples
The SAP scripts must reside in an authorized location on the client. Do not store your scripts in the sample directory because your modifications are lost if you upgrade or reinstall. Always relocate your scripts to a safe location. If the client is clustered, this location must be available after a failover.
- Enable proper permissions on the script files so NetBackup can run the scripts.
On UNIX or Linux, set the access permissions of these scripts to 775.
- Modify the script according to the instructions in the file.
On UNIX or Linux, remember to edit the lines that starts with su. If you do not include su - user in your script, it does not run with the proper account and environment variables. (user is the SAP administrator account.) This situation can lead to problems with database backups and restores.
- In case of sort_backup_type custom, custom sort file can be generated by nbsapcustomsort utility.
Linux:
/usr/openv/netbackup/bin/nbsapcustomsort -u <oracle_username> -p <custom_sort_file_path>
Windows:
install_path\NetBackup\bin\nbsapcustomsort.exe -p <path_for_custom_sort_file_path>
Note:
Ensure that path for -p is allowed listed and it should not contain any spaces.
- Test the scripts you created.