This document contains the following sections:
Before backing up any part of WebCenter Sites, it is best to shut down the application server. If you are backing up an active WebCenter Sites, ensure the active site is not in use and no requests are being made to the application server.
Before recovering any part of WebCenter Sites, ensure the application server is shut down.
Section 33.2.4, "WebCenter Sites Database" (excluding statistics)
This section contains the following subsections:
Jar or tar the WebCenter Sites installation directory.
For example:
tar –cvf ContentServer_backup.tar /u01/CS/Install jar cvf ContentServer_backup.jar /u01/CS/Install
Unjar or untar the backed up WebCenter Sites installation directory.
For example:
tar –xvf ContentServer_backup.tar jar xvf ContentServer_backup.jar
This section contains the following subsections:
Note:
Backing up theShared
directory is unnecessary if it is located in the WebCenter Sites installation directory, and the installation directory was backed up.To back up the Shared
directory, jar or tar the directory.
For example:
tar –cvf Shared_backup.tar /u01/CS/Shared jar cvf Shared_backup.jar /u01/CS/Shared
Note:
Recovering theShared
directory is unnecessary if it is located in the WebCenter Sites installation directory, and the installation directory was recovered.To recover the Shared
directory, unjar or untar the backed up Shared
directory and use it to replace the existing one.
For example:
tar –xvf Shared_backup.tar jar xvf Shared_backup.jar
Table 33-1 summarizes which types of files in a WebCenter Sites web application must be backed up and recovered.
Table 33-1 Backup and Recovery Information for .war and .ear files
.war/.ear Deployment Method | Backup | Recovery |
---|---|---|
Non-Exploded. For WebCenter Sites on WebSphere |
Unnecessary if the WebCenter Sites installation directory is backed up. (The |
Refer to the steps in Section 33.2.3.2.1, "Recovering Non-Exploded Files." |
Exploded. For WebCenter Sites on:
|
No "development changes" to the files.Footref 1 Backup is unnecessary if:
- and -
(The |
Refer to the steps in Section 33.2.3.2.2, "Recovering Exploded Files with No Development Changes." |
With "development changes" to the files.Foot 1 Backup is required. Refer to the steps in Section 33.2.3.1.3, "Backing Up Exploded Files With Development Changes." |
Refer to the steps in Section 33.2.3.2.3, "Recovering Exploded Files with Development Changes." |
Footnote 1 The term "development changes" denoted changes to the content, the data model, template code, publishing destinations, and so on.
This section contains the following subsections:
Section 33.2.3.1.2, "Backing Up Exploded Files With No Development Changes"
Section 33.2.3.1.3, "Backing Up Exploded Files With Development Changes"
See Table 33-1.
See Table 33-1.
Jar or tar the deployed WebCenter Sites web application. Label the backup to distinguish it from the compressed cs.war
file.
For example:
tar -cvf cs_web_backup.tar /u01/software/Tomcat/webapps/cs jar cvf cs_web_backup.jar /u01/software/Tomcat/webapps/cs
This section contains the following subsections:
Section 33.2.3.2.2, "Recovering Exploded Files with No Development Changes"
Section 33.2.3.2.3, "Recovering Exploded Files with Development Changes"
Undeploy the WebCenter Sites application.
Recover the WebCenter Sites installation directory (for instructions, see Section 33.2.1.2, "Recovery").
Redeploy the WebCenter Sites application.
Stop the application server.
Delete the exploded web application.
For example:
rm -rf /u01/software/Tomcat/webapps/cs/*
Recover the WebCenter Sites installation directory (for instructions, see Section 33.2.1.2, "Recovery").
Unjar the backed up WebCenter Sites web application:
For example:
cd /u01/software/Tomcat/webapps/cs jar xvf <sites_install_dir>/ominstallinfo/app/cs.war
Stop the application server.
Delete the exploded web application.
rm -rf /u01/software/Tomcat/webapps/cs
Unjar or untar the backed up WebCenter Sites web application:
cd /u01/software/Tomcat/webapps tar -xvf <path to backup directory>/cs_web_backup.tar
This section contains the following subsections:
Open SQL Server Management Studio.
Connect to the database server.
Expand Databases.
Right-click on the database to be backed up. Click Tasks, then click Backup.
Under Backup type, select Full. Under Destination, click Add.
Enter the path and file name for the backup file. Click OK.
Under Destination, select the newly created backup location.
Click OK.
Log in to the server as the oracle user.
Set ORACLE_HOME
to the oracle database directory and ORACLE_SID
to the database name.
Log in to sqlplus as sys
. Then, do the following:
Use the create directory
sql to map to the OS directory, where the exports will be stored. For example:
SQL> create directory exp_dp_dir as '/u01/backup/exports';
Grant permissions for database export and directory access. For example:
SQL> grant read, write on directory exp_dp_dir to system;
SQL> grant EXP_FULL_DATABASE to system
Run the expdp
comm and to start exporting. For example:
expdp system/<password> DIRECTORY=exp_dp_dir DUMPFILE=<file_name>.dmp FULL=y;
Log in to the server as the db2inst
user.
Run the following command:
db2 force applications all
Run the following command:
db2 backup db <db_name> to <backup_dir>
Note:
After the command has completed, note the timestamp. This timestamp will be included in the name of the database backup file.Open SQL Server Management Studio.
Expand Databases.
Right-click on the database to be restored. Select Tasks, then select Restore, and then select Database.
Under Source for restore, select From database.
Under Select the backup sets to restore, select the most recent backup.
Click Script at the top.
This step opens the query editor containing the restore
statement.
Edit the query by adding REPLACE, after WITH.
This will allow the database log to be overwritten.
Click Execute.
Log in to the server as the oracle user.
Set ORACLE_HOME
to the oracle database directory and ORACLE_SID
to the database name.
Go to $ORACLE_HOME/bin
.
Run the following command:
./impdp system/<password> DIRECTORY=exp_dp_dir DUMPFILE=<file_name>.dmp SCHEMAS=<YOUR_SCHEMA>;
Log in to the server as the db2inst
user.
Run the following command:
db2 force applications all
Run the following command:
db2 restore db <db_name> from <backup_dir> replace existing
Before starting the application server:
Clear the search indexes:
rm –rf <shared_dir>/lucene/Global/*
If you are using Tomcat, clear the application server cache:
rm -rf <server_dir>/tmp/* rm -rf <server_dir>/work/*
Note:
For the WebLogic application server, the cache will be cleared upon redeployment of the application.If you are using Tomcat or WebLogic, clear the compiled JSPs:
rm -rf <web_app_dir>/jsp/cs_deployed/*
After starting the application server, ensure that all caches are synchronized.