Save and restore: servlets

The following items should be considered for backup when using servlets:

Servlet source and class files

Application code and configuration (such as bindings) is located by default in the /QIBM/UserData/WebAS5/Base/instanceName/installedApps directory. By saving this directory, you save your installed applications, including HTML, servlets, JavaServer Pages (JSP) files, and enterprise beans. Normally, each application is located in a separate subdirectory, so you can choose to save all applications or a subset.

Note: The commands below have been wrapped for display purposes. Enter each as a single command.

This command will save all installed applications:

SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file')
 OBJ(('/QIBM/UserData/WebAS5/Base/instance/installedApps'))

This command will save the sampleApp application only:

 SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file')
 OBJ(('/QIBM/UserData/WebAS5/Base/instance/installedApps/cellName/sampleApp.ear'))

If you have located utility or general purpose classes in other directories, such as /QIBM/UserData/WebAS5/Base/instance/lib/app or /QIBM/UserData/WebAS5/Base/instance/lib/ext, be sure to include those locations in your backup plan as well.

User profile data

If you use the User Profile function of WebSphere Application Server, include this data in your backup and recovery plan. User profile data is stored in the USERPROFILE table (iSeries object name USERP00001). By default, the table is in the QEJBAS5UP collection, but can be configured by changing the Data Source associated with the User Profile Manager. For example, if your Data Source has the Database name attribute set to *LOCAL/PROFILE, the user profile data will be stored in the collection PROFILE on the local database. You can choose to save the individual database table or the entire collection:

SAVLIB LIB(QEJBAS5UP) DEV(*SAVF) SAVF(WSALIB/WSASAVF)
SAVOBJ OBJ(USERP00001) LIB(QEJBAS5UP) DEV(*SAVF)
 OBJTYPE(*FILE) SAVF(WSALIB/WSASAVF)

It may be possible to save database objects while WebSphere Application Server is active, if the save operation can obtain a snapshot of the data store. You may have to shut down if a snapshot cannot be obtained. This would occur if there are requests which obtain locks or have open transactions against the database being saved. For more information, see the Backup and Recovery Guide by selecting the Backup, Recovery, and Availability link in the iSeries Information Center.

HTTP configuration

Note: The following information applies to IBM HTTP Server for iSeries (powered by Apache). If you are using Lotus Domino HTTP Server, see the Notes.net Documentation Library (http://www.notes.net/notesua.nsf?OpenDatabase) Link outside Information Center.

Changes to the HTTP configuration are often made to enable WebSphere Application Server to serve servlets and JSP requests, and to enable WebSphere Application Server security. You should consider saving your HTTP configuration as a part of your WebSphere Application Server backup and recovery.

HTTP server instances for IBM HTTP Server for iSeries (powered by Apache) are members of the QATMHINSTC file in the library QUSRSYS. An example save command for this file could be the following:

SAVOBJ OBJ(QATMHINSTC) LIB(QUSRSYS) DEV(*SAVF) OBJTYPE(*FILE) SAVF(WSALIB/WSASAVF)

The HTTP configurations for IBM HTTP Server for iSeries (powered by Apache) are stored in the integrated file system in a subdirectory, chosen when the configuration was created. The recommended location is within the WebSphere instance directory. You can determine this file location by inspecting HTTP server instance member in the QATMHINSTC file in library QUSRSYS. An example save command for this file could be the following:

SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file') OBJ(('/QIBM/UserData/WebAS5/Base/instanceName/apache/conf')   
  ('/QIBM/UserData/WebAS5/Base/instanceName/htdocs'))

where instanceName is the name of your instance. The default instance name is default.