You are on page 1of 13

Backup & Restore Guidelines

SDN Community Contribution


(This is not an official SAP document.)

Disclaimer & Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

-1-

Backup & Restore Guidelines

Applies To:
SAP NetWeaver 04 and previous versions.

Summary
This document describes the general ideas of Backup & Restore concepts for a distributed system environment. It provides the information needed to set up a Backup & Restore strategy for an implementation of the EP 6.0, KMC and Web Application on SAP Web AS 6.40 Java. By: Oleg Figlin Company: SAP UK Date: 18 October 2005

Table of Contents
Applies To: ................................................................................................................................. 2 Summary.................................................................................................................................... 2 Table of Contents ....................................................................................................................... 2 Overview .................................................................................................................................... 3 Scope of document ................................................................................................................. 3 Backup & Restore Overview ....................................................................................................... 1 Supported Backup Methods........................................................................................................ 2 Online Backup......................................................................................................................... 2 Offline Backup......................................................................................................................... 2 System components to be backed up.......................................................................................... 3 Which directories should be backed up?.................................................................................. 4 Restoring.................................................................................................................................... 7 Appendix .................................................................................................................................... 9 Author Bio ................................................................................................................................ 10

-2-

Backup & Restore Guidelines

Overview
Backup and restore strategies relate to specific backup and restore solutions offered by specific vendors, therefore detailed information on various backup strategies is not discussed in this document. Scope of document The following topics are in scope in this document: Backup & Restore strategy for Web Applications (on top of SAPJ2EE ) Backup & Restore strategy for an implementation of the Enterprise Portal 6.0 Backup & Restore strategy for an implementation of KMC

The following topics are out of scope in this document: Backup applications running on the ABAP-Stack of SAP NetWeaver 04 Backup of Java based components like XI, BI or other applications running of WebAS 6.40 Java Backup of TREX: Backup of systems, integrated into the Enterprise Portal Backup of customer specific components

- You will see this image in many places below. This sign meaning the recommendations section.

-3-

Backup & Restore


Backup & Restore Overview
Backup refers to the activity of copying files, data, or network volume, with the intention of preserving them for later use in case of hardware failure, or other disaster. It is important to implement a backup-and-restore strategy that protects your system against data loss, it enables you to restore the system to its correct and consistent state. The most important part of any security strategy is to backup the system at regular intervals. This means the system (files, databases, etc.) must be copied to another storage medium. When the system is damaged, the stored duplicate can be re-loaded to restore it. When you retrieve files that have been backed up earlier, you are restoring them. The many reasons for backing up data include hard drives crashing, viruses infecting your system and destroying your data, human error wreaking havoc on your business, or a stolen system with your data on it. Criteria to evaluate the quality of a Backup & Restore strategy: 1. Minimize Data Loss and Data Inconsistencies: A system backup must ensure a system recovery to a certain point in time, e.g. a crash. 2. Is data loss acceptable? To which degree? Can data be recovered from data in other systems? 3. Which kind of data can be inconsistent? Can operation continue with partly inconsistent data? 4. Backup Runtime and Speed of the Restore: A fast backup can reduce the impact on production. 5. According to Service Level Agreements (SLA), the implementation of special solutions, e.g. mirror disks, might be required. 6. The restore process must usually meet some kind of agreement that regulates system availability. Necessary considerations for SAP NetWeaver 04 Java components and web application deployed on top of SAPJ2EE for design of a backup & restore strategy are: Which system components and which data need to be backed up? Which backup methods shall be used (online/offline) depending on the data storage type (file system, database)? Is a consistent system landscape backup necessary? In which situations is a system landscape backup necessary?

Carefully develop your backup and restore strategy for portal infrastructure and web applications in order to achieve a consistent state upon recovery. The strategy may involve backup at the component level, or a full backup of the entire system. Portal components and their configuration are independent, and need to be backed up together. All operations of the portal that use some type of storage for saving business information must be considered for backup. When deciding on which backup method (online / offline) should be used you have to take into consideration the type of the storage (File System / Database) that you are using. In most cases, backing up just the database shared by the portal and SAP Web Application Server is sufficient.

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

Backup & Restore


SAP recommends strongly to perform OFFLINE backup on a regular basis (e.g. weekly or bi-weekly)

Supported Backup Methods


Data of Web AS 6.40 Java Cluster and deployed applications (EP, KMC) is stored in DB. Essential data to start, stop, run and monitor the Web AS 6.40 Java cluster is stored on the file system. Two possible solutions exist for backing up the data.

Online Backup
All components, which need to be backed up, are up and running. No downtime is required! Online backup takes place during system operations (while various components and services are running). Files that are opened are not backed up during online backup of databases and file systems. You may choose to employ additional software to complement the online backup. Starting with SAP NetWeaver 2004 SP Stack 10, online backup is officially supported for all SAP NetWeaver components without restrictions (Some restriction presented in WEB AS 6.20 and EP 6.0 on 6.20). For general backup procedures of the central SAP Web Application Server database, see the SAP NetWeaver Technical Operations Manual (TOM). Online backup of the Web AS 6.40 database and file system is possible. The database is the primary persistence for data storage. Parts of the file system are synchronized with the DB upon any Java system restart.

Offline Backup
All components, which need to be backup, are shut down. Downtime necessary availability of components is reduced! Offline backup is performed after system operations have been stopped, and a snapshot of the system's state at a point in time is mirrored onto a media. The advantage of offline backup is your ability to preserve the consistent state of the backed up system, and then to restore the system to the same state.

Online and offline backups each have advantages and disadvantages. Therefore a good backup strategy must include both online and offline backup to enable 24 x 7 support for restore or recovery if needed. When performing Online backup, if you keep data outside the WebAS database, you must back up this data separately. This is for instance the case for repositories connected to KM, for TREX indices, for LDAP data, etc. For more information about component-specific backup procedures, see the Portal, Business Information Warehouse, Exchange Infrastructure, Knowledge Management, TREX, and Mobile Infrastructure sections of the TOM. Online and offline backup is supported for both: DB and FS! A backup concept of SAP NetWeaver 04 Java must include the following tasks:

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

Backup & Restore


Task Regular backup of the Web AS 6.40 database Regular backup of the Web AS 6.40 file system Regular backup of the operating system to include additional software like JDK or DB files Backup Type Online AND/ OR Offline Online AND/ OR Offline Offline Frequency (Proposal) Daily After any deployment No SAP Recommendation available

System components to be backed up


Knowing the NetWeaver components is helpful in planning your backup strategy. The following are the critical components: Components J2EE Engine Cluster Portal Framework iView Runtime Java (IRJ) application Database Description The Portal Runtime runs on top of the J2EE Engine of the SAP Web Application Server. The Portal Framework is a logical environment comprised of a collection of software applications for running and managing the portal. The iView runtime application is a runtime environment for processing iViews. This is a relational database management system (RDBMS) shared by the portal and SAP Web Application Server. The database is usually on a separate machine. It stores data for the Portal Content Directory (PCD), which is based on the database repository. The database stores runtime objects, including role definitions, page-to-role relationships, deployable (PARs), and iView templates, together with their personalization data and derivations. Refers to user related data stored in one or more repositories. Such user related data repositories might be a database, Lightweight Directory Access Protocol (LDAP) directory server, or SAP R/3 System.

User Persistence Store

As the portal interrelates with other components, these must be backed up too. They can include: Web servers User Persistence Store Java applications and their configuration files Native applications and their configuration files Relational Database Management System (RDBMS) and their data

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

Backup & Restore

Add-In installation

Java Only Installation

System Component Web AS 6.40 Java Cluster File system and Database (Startup Framework, SCS instance, Central Instance and any Dialog Instance) Software Deployment File system Manager (SDM) Internet Graphics Server (IGS) SAPCCMSR Agent SAPOSCol Agent RDBMS Instance Enterprise Portal 6.0 (as application deployed on Web AS 6.40 Java cluster)

Type of data Configuration Data & Software Application Data Configuration Data Configuration Data Configuration Data & Software Configuration Data Software Application Data

Storage of data File system and Database

File system File system File system and Database File system and Database Database and File system

Content Management & Collaboration (as application deployed on Web AS 6.40 Java cluster) User Management Persistence

Configuration Data Software Application Data Application Data

Database and File system Depending on configuration: external systems (file system, database) Database Depending on configuration: external systems (LDAP servers, database)

Which directories should be backed up? 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 4

Backup & Restore

WEB AS 6.40 Add In Installation - J2EE Instance on File System - File structure Backup

WEB AS 6.40 Java Only J2EE Instance on File System - File structure Backup

Data of the EP 6.0 and KMC is partially stored on the file system: Configuration and Software Data in /usr/sap/<sid>/SYS/global/* Configuration files like PCD and CM property files Libraries, jar-files Application Data in /usr/sap/<sid>/SYS/global/* 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 5

Backup & Restore


Transport Packages of EP Content in /usr/sap/<sid>/SYS/global Data of XML Forms Builder in /usr/sap/<sid>/SYS/global/config/cm/etc

WEB AS 6.40 Directory Structure of J2EE Instance

The Bootstrap JAVA program synchronizes the binary data from the Java database with the local file system and creates a property file, which describes the processes of the Java instance. Data consistency between DB and FS is guaranteed by the bootstrapping! The SDM (Software Deployment Manager) writes information about deployments into the file system.In your backup routine, include a backup of SDM directories, stored on FS _ /usr/sap/<sid>/<instance_00>/SDM This data changes upon any software deployment done via SDM and SAPInst. During any software deployment via SDM and SAPInst, files can be opened. Thus, it is recommended to backup /usr/sap/<sid>/<instance_00>/SDM, while no deployments are proceeded (e.g. when SDM is stopped). Configuration/ Software Data of EP 6.0 and KMC are stored on FS. Online Backup is possible as files are only read by the applications! Creating transport packages and defining XML forms builder projects will perform write operations to FS. During online backup, loss of data might therefore be possible! But: This is administrator activity only! Transport packages are reproducible! Include a regular DB backup into your backup routine! Include a regular FS backup into your backup routine, e.g. after applying hotfixes, patches or service packs! UNIX: /usr/sap/<sid>/* UNIX: /sapmnt/<sid>/* Windows: \usr\sap\<sid>\*

To guarantee consistency of an online backup of the file system, stop SDM to prevent any write activity during the backup. 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 6

Backup & Restore


Define procedures to stop administration of EP transport packages and XML forms builder projects during online FS backup! Dont forget to include components like Java Runtime Environment and DB files (Log files, binaries) on FS into your backup concept. The use of hardware which can do snapshots of the hard disks reduces the downtime and the backup is consistent Recommended Steps for a DB online backup SDM should not be running during backup (no Deployment) Schedule a short period of inactivity of WEB AS administrators to reduce the probability of inconsistencies Schedule a short period of inactivity of end users to reduce the probability of inconsistencies For every SAP application running on your SAP J2EE Engine refers to the corresponding Solution Manager Guide and carries out the described backup procedures. Offline backup is fully supported with WEB AS 6.40. SAP assures that a correctly performed OFFLINE backup is consistent and thus can be restored successfully. When performing an OFFLINE backup the following components of installation must be shut down: All J2EE Engine processes on all machines All DB processes All TREX processes (for EP) Make a quick snapshot and write it to the tape while the application server runs again Shut down all services on each application server Copy all files quickly to a fast storage device Start up the portal immediately after the files are copied Perform a real (slow) backup to tapes from the temporary Directories

Restoring
A successful backup is good to have; however, a successful restore is the key. Restoring a system from an online backup can present problems; therefore, restoring a system based on an online backup must be followed by verification tests. Restore Procedure of WebAS 6.40 Java and deployed applications: 1. Restore Java Instances a. Delete the following directories of the file system backup: /usr/sap/<sid>/<Java_instance_##>/j2ee/cluster/dispatcher/ /usr/sap/<sid>/<Java_instance_##>/j2ee/cluster/server0/ b. Restore the following paths of the file system on UNIX: /sapmnt/<sid>/* /usr/sap/<sid>/* 2. Restore DB 3. Restore SDM 4. Restore Deployed Applications 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 7

Backup & Restore


5. Restore J2EE Engine 6. Restart Web AS 6.40 Java! To enable the startup of the Web AS 6.40, you need to restore configuration files and executables of Web AS 6.40 startup & control framework SCS instance bootstrapping configuration files: Application Data will be resynchronized to the file system by bootstrapping the database. Bootstrapping Synchronization of Binaries into FS.

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

Backup & Restore


Appendix
SAP Official Documentation: Documentation on http://help.sap.com > Documentation > SAP NetWeaver > Technical Operations Manual > Management of SAP Web Application Server (Java) > Backup & Recovery of SAP Web Application Server Java Note: General considerations for Backup and Restore Concepts are explained for the Web AS 6.40, but apply to all other SAP NetWeaver Java components. Specific information for EP 6.0 and KMC need to be checked in chapter Additional Administration of SAP NetWeaver Components. http://help.sap.com/saphelp_nw04/helpdata/en/01/2bd13ffc9a4a21e10000000a1550b0/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/a2/e12840d89d185de10000000a1550b0/content.htm SAP Release Notes SAP Note 779708: EP6 on Web AS 6.40 Online Backup and Restore Strategy o Starting with SP Stack 10, online backup is officially supported.

SAP Note 711093: Release Restriction Note for Web AS 6.40 o o HA-Setups for SAP NetWeaver 04 are currently released on project base only Official SAP Consultations are necessary ( -> 803018)

SAP Note 709354: Release Restrictions for SAP EP 6.0 on Web AS 6.40 o DB switch-over solutions on project base only ( -> 803018)

SAP Note 803018: Central note for NetWeaver04 High Availability capabilities o HA-Setups for SAP NetWeaver 04 are currently released on project base only ( -> 711093 and 709354)

SAP Note 785848: Hom./Het. System Copy SAP Web AS 6.40 SR1 Java For additional information on how to perform online backup of TREX, see SAP Note number 666279. For information on how to perform an offline backup of TREX, see SAP Note number 639053. Consistency Check Tool UME consistency check tool Component com.sap.security.ume.securitycheck.default Available for EP 6.0 SPS10 SAP Note 818947 for details

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

Backup & Restore


Author Bio
Oleg Figlin is a Senior NetWeaver Solution Architect in the NWSO working in EMEA and based in UK. He has 7 years of experience in C++/Java/jJ2EE development, architecture and design and 5 of them are in SAP. He started his career at SAP as Java/C++ developer and developed CRM Service and Sales application for handheld > EP50 and EP60 development teams -> NetWeaver Solution Architect since 2004.

2005 SAP AG

The SAP Developer Network: http://sdn.sap.com

10

You might also like