Backing up SAP NetWeaver Application Server for Java (AS Java) and the relevant database prevents you from data loss and is essential for the recovery of the server after the system breaks down. You can use the backup data to restore your system in various scenarios. For example, you can:
restore the initial state of the system if an installation or upgrade fails
restore the AS Java installation in case of operating system or file system problems
restore the SAP system data if the database crashes, and so on.
You can apply two backup strategies:
Offline backup- this strategy enables you to create a full and reliable backup of your system, so that the system can be restored in case of a hard disk crash or operating system problems. This strategy requires system downtime, and therefore is not very suitable to be performed on a daily basis. For more information, see Backup and Recovery .
Online backup - using this strategy, you can back up the database and the file system, which enables you to recover only particular components of your system. It does not require full system shutdown, and therefore is convenient for creating regular incremental data backup. Online backup does not guarantee a full and consistent backup of all system components.
We recommend that you perform regular offline and online backups of your system and system components. The frequency recommendations provided here are only advisable. The frequency of the offline and online backups of your system should be determined by you depending on your scenario, the changes that you make in the system, the occurrence of other important system events, and your requirements for system downtime.
The backup tools for your database and the backup solution for your system are installed and available.
The most important administration tasks related to backing up and restoring that you need to perform in the AS Java are listed below.
Backing up the system
After installation, before and after upgrade of AS Java, you need to perform a full offline backup of your system. For more information, see the relevant installation guides on SAP Service Marketplace at http://service.sap.com . Note that after the initial offline backup, it is highly recommended to perform offline backup at least once a week.
After you have created a full backup of your system, you should perform regular online backups of the following components:
We recommend that you include the online backup of the database as well as the logs in the daily routine. In case the deployed applications use an external database as a persistent storage, make sure that you back up that database, too. Note: The consistency of data when you back up more than one database is the responsibility of the user. You can create a backup copy of your database so that you can recover the database if errors occur. For more information, see your database-specific documentation.
Create a backup of the SAP system directory /usr/sap/SAPSID
To ensure that the online file system backup is consistent, the SAP System must be up and running and no deploy operations must be performed during the process. To prevent any deploy operation on the system during the backup, set the property deployment_forbidden of the deploy controller to ON . After the online backup of the system has finished, revert the property to the default value OFF .
You must make sure that no deploy operations have been started on the system before the property is set. You can identify if there is an ongoing deploy operation by executing command sapcontrol -nr instance_number -function EnqGetLockTable .
If the output of the command contains no entries starting with "$services.deploy" and "$services.dc", there is no ongoing deployment.
Changing the property deployment_forbidden requires user interaction. If you want to automate the process, you can use the command line tool opm. It is located in the configtool folder /usr/sap/SAPSID/Instance ID/j2ee/configtool . You can use the following command to change the value of the deploy controller property: opm -s tc~bl~deploy_controller deployment_forbidden on .
Restoring the system
Shut down the system.
Install a new AS Java system using the software provisioning manager, or restore the file system from the latest offline backups that you have created.
Import the database backup using the relevant tools provided by the database vendor.
Restore the SAP system directory /usr/sap/SAPID from the online or offline backup
Change the sync strategy of the bootstrap process to FORCE. For more information, see SAP Note 710663 .
Run the bootstrap process. To run the bootstrap process, execute the following command from folder /usr/sap/SAPSID/instance_name/j2ee/cluster/ with user SIDADM :
../../exe/jstart.exe -launch -file=../../exe/startup.properties -nodename=bootstrap pf=<path to the JXX profile>
, where <path to the JXX profile> must contain the path to the working profile and not the start profile (for example, /usr/sap/SID/SYS/profile/SID_Jnn_hostname ).
Change the sync strategy of the bootstrap process to the default one.
Start the system.
AS Java is restored with the last backup.