Note
CCBR only saves PRIMECLUSTER configuration information.
CCBR provides a simple method to save the current PRIMECLUSTER configuration information of a cluster node. It also provides a method to restore the configuration information whenever a node update has caused severe trouble or failure, and the update (and any side-effects) must be removed. CCBR provides a node-focused backup and restore capability. Multiple cluster nodes must each be handled separately.
CCBR provides the following commands:
cfbackup(1M)
Saves all information into a directory that is converted to a compressed tar archive file.
cfrestore(1M)
Extracts and installs the saved configuration information from one of the cfbackup(1M) compressed tar archives.
After cfrestore(1M) is executed, you must reactivate the RMS configuration in order to start RMS. Once the reactivation of the RMS configuration is done, RMS will have performed the following tasks:
Checked the consistency of the RMS configuration
Established the detector links for RMS to be able to monitor resources
Ensured proper communication between cluster nodes
Created the necessary aliases for the shell commands used in the Wizard Tools. This is done automatically during RMS activation.
See "4.4 Activating a configuration" in "PRIMECLUSTER Reliant Monitor Services (RMS) with Wizard Tools Configuration and Administration Guide."
Note
To guarantee that the cfrestore(1M) command will restore a functional PRIMECLUSTER configuration, it is recommended that there be no hardware or operating system changes since the backup was taken, and that the same versions of the PRIMECLUSTER products are installed.
Because the installation or reinstallation of some PRIMECLUSTER products and kernel drivers, device reconfiguration may occur. This is usually not a problem. However, if Network Interface Cards (NICs) have been installed, removed, replaced, or moved, the device instance numbers (for example, the number 2 in /dev/hme2) can change. Any changes of this nature can, in turn, cause a restored PRIMECLUSTER configuration to be invalid.
cfbackup(1M) and cfrestore(1M) consist of a framework and plug-ins. The framework and plug-ins function as follows:
The framework calls the plug-in for the SMAWcf package.
This plug-in creates and updates the saved-files list, the log files, and error log files.
All the other plug-ins for installed PRIMECLUSTER products are called in name sequence.
Once all plug-ins have been successfully processed, the backup directory is archived by means of tar(1M) and compressed.
The backup is logged as complete and the file lock on the log file is released.
The cfbackup(1M) command runs on a PRIMECLUSTER node to save all the cluster configuration information. To avoid any problem, this command should be concurrently executed on every cluster node to save all relevant PRIMECLUSTER configuration information. This command must be executed as root. If a backup operation is aborted, no tar archive is created. If the backup operation is not successful for one plug-in, the command processing will abort rather than continue with the next plug-in. cfbackup(1M) exits with a status of zero on success and non-zero on failure.
The cfrestore(1M) command runs on a PRIMECLUSTER node to restore all previously saved PRIMECLUSTER configuration information from a compressed tar archive. The node must be in single-user mode with CF not loaded. The node must not be an active member of a cluster. The node must not be an active member of a cluster. cfrestore(1M) exits with a status of zero on success and non-zero on failure.
It is recommended to reboot once cfrestore(1M) returns successfully. If cfrestore(1M) aborts, the reason for this failure should be examined carefully since the configuration update may be incomplete.
Note
You cannot run cfbackup(1M) and cfrestore(1M) at the same time on the same node. However, cfbackup(1M) command can be run on multi-user mode, but cfrestore(1M) command cannot be run on single-user mode.
Some PRIMECLUSTER information is given to a node when it joins the cluster. The information restored is not used. To restore and to use this PRIMECLUSTER information, the entire cluster needs to be DOWN, and the first node to create the cluster must be the node with the restored data.When a node joins an existing, running cluster, the restored configuration is gone because it is the first node in the cluster that determines which restored configuration to use.
The following files and directories that are fundamental to the operation of the cfbackup(1M) and cfrestore(1M) commands:
The /opt/SMAW/ccbr/plugins directory contains executable CCBR plug-ins. The installed PRIMECLUSTER products supply them.
The /opt/SMAW/ccbr/ccbr.conf file must exist and specifies the value for CCBRHOME, the pathname of the directory to be used for saving CCBR archive files.
A default ccbr.conf file, with CCBRHOME set to /var/spool/SMAW/SMAWccbr is supplied as part of the SMAWccbr package. The system administrator can change the CCBRHOME pathname at any time. The system administrator might need to change the CCBRHOME pathname to a file system with sufficient disk space.
Note
It is important to remember that re-installing the SMAWccbr package will reset the contents of the /opt/SMAW/ccbr/ccbr.conf file to the default package settings.
The following is an example of ccbr.conf:
#!/bin/ksh - #ident "@(#)ccbr.conf Revision: 12.1 02/05/08 14:45:57" # # CCBR CONFIGURATION FILE # # set CCBR home directory # CCBRHOME=/var/spool/SMAW/SMAWccbr export CCBRHOME
The /opt/SMAW/ccbr/ccbr.gen (generation number) file is used to form the name of the CCBR archive to be saved into (or restored from) the CCBRHOME directory.
This file contains the next backup sequence number. The generation number is appended to the archive name.
If this file is ever deleted, cfbackup(1M) or cfrestore(1M) will create a new file containing the value string of 1. Both commands will use either the generation number specified as a command argument, or the file value if no command argument is supplied. The cfbackup(1M) command additionally checks that the command argument is not less than the value of the /opt/SMAW/ccbr/ccbr.gen file. If the command argument is less than the value of the /opt/SMAW/ccbr/ccbr.gen file, the cfbackup(1M) command will use the file value instead.
Upon successful execution, the cfbackup(1M) command updates the value in this file to the next sequential generation number. The system administrator can update this file at any time.
If cfbackup(1M) backs up successfully, a compressed tar archive file with the following name will be generated in the CCBRHOME directory as follows:
hostname_ccbrN.tar.Z
hostname is the nodename and N is the number suffix for the generation number.
For example, in the cluster node fuji2, with the generation number 5, the archive file name is as follows:
fuji2_ccbr5.tar.Z
Each backup request creates a backup tree directory.
The directory is as follows:
This directory will be deleted after completing the execution of command.
CCBRHOME/nodename_ccbrN.
nodename is the node name and N is the number suffix for the generation number.
CCBROOT is set to this directory.
For example, enter the following on the node fuji2:
fuji2# cfbackup 5
Using the default setting for CCBRHOME, the following directory will be created:
/var/spool/SMAW/SMAWccbr/fuji2_ccbr5
This backup directory tree name is passed as an environment variable to each plug-in.
The CCBRHOME/ccbr.log log file
Contains startup, completion messages, and error messages. All the messages are time stamped.
CCBROOT/errlog log file
Contains specific error information when a plug-in fails. All the messages are time stamped.
CCBROOT/plugin.blog or CCBROOT/plugin.rlog log files
Contain startup and completion messages from each backup/restore attempt for each plug-in. These messages are time stamped.
Example
Example 1: Backup
The following command backs up and validates the configuration files for all CCBR plug-ins that exist on the system fuji2.
fuji2# cfbackup
CCBR performs the backup automatically and does not require user interaction. Processing has proceeded normally when a message similar to the following appears at the end of the output:cfbackup(1M) command will output the following:
04/30/04 09:16:20 cfbackup 11 ended
This completes the backup of PRIMECLUSTER.
In the case of an error, the subdirectory /var/spool/SMAW/SMAWccbr/fuji2_ccbr11 is created.
Refer to "Chapter 9 Diagnostics and troubleshooting" for more details on troubleshooting CCBR.
Example
Example 2: Restore
Before doing cfrestore(1M), CF needs to be unloaded, the system needs to be in single-user mode, and the disks need to be mounted.
The following files are handled differently during cfrestore(1M):
root files
These are the files under the CCBROOT/root directory. They are copied from the CCBROOT/root file tree to their corresponding places in the system file tree.
OS files
These files are the operating system files that are saved in the archive but not restored. The system administrator might need to merge the new OS files and the restored OS files to get the necessary changes.
For example, on fuji2 we entered the following command to restore the configuration to backup 11.
fuji2# cfrestore 11
The restore process asks you to confirm the restoration and then carries out the process automatically. Processing has proceeded normally when a message similar to the following appears at the end of the output:
05/05/04 13:49:19 cfrestore 11 ended
This completes the PRIMECLUSTER restore.