This chapter supports the previous chapters of Part III, "Upgrading Oracle WebCenter Sites: Site Capture" by providing detailed information about the backup and recovery steps you are instructed to complete in those chapters.
This chapter contains the following sections:
Before backing up any part of Site Capture application, it is best to shut down the application server. If you must make a backup of the active Site Capture application, ensure the website is not in use and no requests are being made to the application server.
Before recovering any part of the Site Capture application, ensure the application server is shut down.
This section contains steps for backing up and recovering the Site Capture installation directory, web application, and database.
This section contains the following topics:
This section contains the following topics:
Jar or tar the Site Capture installation directory.
For example:
tar -cvf SiteCapture_backup.tar /u01/CS/Install jar cvf SiteCapture_backup.jar /u01/CS/Install
Unjar or untar the backed-up Site Capture installation directory.
For example:
tar -xvf SiteCapture_backup.tar jar xvf SiteCapture_backup.jar
Refer to Table 9-1 and the sections that follow.
Table 9-1 Backup and Recovery Information for the ROOT .war File
.war Deployment Method | Backup | For Recovery Information, See... |
---|---|---|
Non-Exploded.For Site Capture on WebSphere |
Unnecessary if the Site Capture installation directory is backed up.The <sc_install_dir>/ fw-site-capture/webapps/ |
|
Exploded.For Site Capture on:
|
|
Section 9.2.6, "Exploded Files Recovery" with no development changes |
Same as previous row. |
|
Section 9.2.6, "Exploded Files Recovery" with development changes |
See Table 9-1.
Undeploy the Site Capture application.
Recover the Site Capture installation directory (for instructions, see Section 9.2.1, "Site Capture Installation Directory.").
Redeploy the Site Capture application.
To back up exploded files with no development changes, see Table 9-1.
To back up exploded files with development changes:
Jar or tar the deployed Site Capture web application. Label the backup to distinguish it from the compressed ROOT.war
file. For example:
tar -cvf ROOT_web_backup.tar /u01/software/Tomcat/webapps/ROOT jar cvf ROOT_web_backup.jar /u01/software/Tomcat/webapps/ROOT
To recover exploded files with no development changes:
Stop the application server.
Delete the exploded web application.
For example:
rm -rf /u01/software/Tomcat/webapps/ROOT/*
Recover the Site Capture installation directory (for instructions, see Section 9.2.1, "Site Capture Installation Directory."
Unjar the backed-up Site Capture web application. For example:
cd /u01/software/Tomcat/webapps/ROOT jar xvf /ominstallinfo/app/ROOT.war
To recover exploded files with development changes:
Stop the application server.
Delete the exploded web application.
For example:
rm -rf /u01/software/Tomcat/webapps/ROOT
Unjar the backed-up Site Capture web application. For example:
cd /u01/software/Tomcat/webapps jar xvf <sc_install_dir>/ROOT_web_backup.tar
This section covers the following databases: Oracle 11g; Microsoft SQL Server 2005, 2008, and 2008 R2; IBM DB2 9.7
This section contains the following topics:
Section 9.2.7.1, "Backup of Oracle, Microsoft SQL Server, and IBM DB2 Databases"
Section 9.2.7.2, "Recovery of Oracle, Microsoft SQL Server, and IBM DB2 Databases"
To back up Oracle 11g
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 operating system 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
command to start exporting. For example:
expdp system/<password> DIRECTORY=exp_dp_dir DUMPFILE=<file_name>.dmp FULL=y SCHEMA=<YOUR_SCHEMA>;
To back up Microsoft SQL Server 2005, 2008, or 2008R2
Open SQL Server Management Studio.
Connect to the database server.
Expand Databases.
Right-click on the database to be backed up. Click Tasks > 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 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.
To recover Oracle 11g
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>;
To recover SQL Server 2005, 2008 or 2008R2
Open SQL Server Management Studio.
Connect to the database server.
Expand Databases.
Right-click on the database to be restored. Select Tasks > Restore > 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.
To recover DB2 9.7
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, note the following:
If you are using Apache Tomcat, clear the application server cache:
rm -rf <server_dir>/tmp/* rm -rf <server_dir>/work/*
For the Oracle WebLogic application server, the cache will be cleared upon redeployment of the application.