Top
PRIMECLUSTER Wizard for Oracle 4.6 Configuration and Administration Guide
FUJITSU Software

4.4 cloracpy - Create Backup File for Oracle Database Setup

User

Oracle DBA user

Format

/opt/FJSVclora/sbin/cloracpy

Function

cloracpy enables users to backup files required for Oracle database setup on the operating node in the tar format. Also, the users can copy the file and set links by extracting the backup data on the standby nodes.

The command can be used in the following cases:

  • Standby operation

  • Oracle Database Software is located on local disk of each node.

  • The $ORACLE_HOME and $ORACLE_BASE settings are the same between the operating node and the standby nodes.

  • The Oracle database configuration is the same between the operating node and the standby nodes.

  • Database creation and setup is already completed on the operating node.

  • The command is executed with Oracle user access privileges

  • $ORACLE_BASE, $ORACLE_HOME, and $ORACLE_SID are set in the Oracle user environment variables.

The following backup files can be created in the tar format:

  • All files under $ORACLE_HOME/dbs

  • All files under $ORACLE_BASE/admin/$ORACLE_SID

  • All files under $ORACLE_HOME/network/admin

  • All files under $ORACLE_BASE/diag

The files on the operating node will be stored in the "/tmp/oracle.$ORACLE_SID.tar" file. The procedure for deploying the tar file in the standby node is as follows.

  1. Forward the /tmp/oracle.<$ORACLE_SID>.tar from the operation node to the standby node.

  2. Executed "tar xvfP /tmp/oracle.<$ORACLE_SID>.tar" with root user.

Information

It is also possible to deploy with the Oracle user, if group of the files included in the tar file are Oracle user's initial group of all.
Execute the following command, and if the execution result of the find command is all 0, it is possible to deploy with the Oracle user. If deploy with the Oracle user, executed "tar xvfPp /tmp/oracle.<$ORACLE_SID>.tar".

# su - <Oracle user>
$ id -a
$ find $ORACLE_HOME/dbs -not -group <Oracle user's initial group name> | wc -l
$ find $ORACLE_BASE/admin/$ORACLE_SID -not -group <Oracle user's initial group name> | wc -l
$ find $ORACLE_HOME/network/admin -not -group <Oracle user's initial group name> | wc -l
$ find $ORACLE_BASE/diag -not -group <Oracle user's initial group name> | wc -l

It is an example as follows that Oracle user is "oracle", Oracle user's initial group name is "oinstall", the execution result of the find command is all "0", ORACLE_SID is "ora".

# su - oracle
$ id -a
uid=1001(oracle) gid=1005(oinstall) groups=1005(oinstall),1006(dba),1007(asmadmin),1008(asmdba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$ find $ORACLE_HOME/dbs -not -group oinstall | wc -l
0
$ find $ORACLE_BASE/admin/$ORACLE_SID -not -group oinstall | wc -l
0
$ find $ORACLE_HOME/network/admin -not -group oinstall | wc -l
0
$ find $ORACLE_BASE/diag -not -group oinstall | wc -l
0
$ tar xvfPp /tmp/oracle.ora.tar

Note

  • Since cloracpy creates and deploy the backup files in the tar format using the full path, it cannot be used if the "$ORACLE_BASE" and "$ORACLE_HOME" settings are incompatible between the operating and standby nodes.

    Also, if the operation method is different between the operating node and standby nodes, the command cannot be used. If a file with the same name exists, it will be overridden.

  • In the standby node, if the directories which are specified in the initialization parameters, AUDIT_FILE_DEST, BACKGROUND_DUMP_DEST, CORE_DUMP_DEST, USER_DUMP_DEST and DIAGNOSTIC_DEST, do not exist, create them. The access privilege to the directory must be also the same as that on the operating node.

  • When the database name and ORACLE_SID are different, all files under $ORACLE_BASE/admin/$ORACLE_SID directory cannot be backed up. Therefore, copy all files under $ORACLE_BASE/admin/<database name> manually.

    When cloracpy is executed in the configuration that the database name and ORACLE_SID are different, the following message is output.

    cloracpy: <$ORACLE_BASE>/admin/<$ORACLE_SID> is invalid.
Parameter

None.

Exit status

0: Normal termination

Non-0: Abnormal termination