Monday, September 27, 2010

veritas: Backing up the Veritas Cluster Server configuration

Veritas cluster server stores custom agents and it’s configuration data as a series of files in /etc, /etc/VRTSvcs/conf/config and /opt/VRTSvcs/bin/ directories. Since these files are the life blood of the cluster engine, it is important to backup these files to ensure cluster recovery should disaster hit. VCS comes with the hasnap utility to simplify cluster configuration backups, and when run with the “-backup,” “-n,” “-f ,” and “-m ” options, a point in time snapshot of the cluster configuration will be written to the file passed to the “-f” option:








 # hasnap -backup -f clusterbackup.zip -n -m “Backup from March 25th 2007″ 

 Starting Configuration Backup for Cluster foo

 Dumping the configuration...

 Registering snapshot "foo-2006.08.25-1156511358610"

 Contacting host lnode1...

 Error connecting to the remote host "lnode1"

 Starting backup of files on host lnode2
 "/etc/VRTSvcs/conf/config/types.cf" ----> 1.0
 "/etc/VRTSvcs/conf/config/main.cf" ----> 1.0
 "/etc/VRTSvcs/conf/config/vcsApacheTypes.cf" ----> 1.0
 "/etc/llthosts" ----> 1.0
 "/etc/gabtab" ----> 1.0
 "/etc/llttab" ----> 1.0
 "/opt/VRTSvcs/bin/vcsenv" ----> 1.0
 "/opt/VRTSvcs/bin/LVMVolumeGroup/monitor" ----> 1.0
 "/opt/VRTSvcs/bin/LVMVolumeGroup/offline" ----> 1.0
 "/opt/VRTSvcs/bin/LVMVolumeGroup/online" ----> 1.0
 "/opt/VRTSvcs/bin/LVMVolumeGroup/clean" ----> 1.0
 "/opt/VRTSvcs/bin/ScriptAgent" ----> 1.0
 "/opt/VRTSvcs/bin/LVMVolumeGroup/LVMVolumeGroup.xml" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/fdsched" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/monitor" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/fdsetup.vxg" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/open" ----> 1.0
 "/opt/VRTSvcs/bin/ScriptAgent" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/RVGSnapshotAgent.pm" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/RVGSnapshot.xml" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/offline" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/online" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/attr_changed" ----> 1.0
 "/opt/VRTSvcs/bin/RVGSnapshot/clean" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/monitor" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/open" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/RVGPrimary.xml" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/offline" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/online" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/clean" ----> 1.0
 "/opt/VRTSvcs/bin/ScriptAgent" ----> 1.0
 "/opt/VRTSvcs/bin/RVGPrimary/actions/fbsync" ----> 1.0
 "/opt/VRTSvcs/bin/triggers/violation" ----> 1.0
 "/opt/VRTSvcs/bin/CampusCluster/monitor" ----> 1.0
 "/opt/VRTSvcs/bin/CampusCluster/close" ----> 1.0
 "/opt/VRTSvcs/bin/ScriptAgent" ----> 1.0
 "/opt/VRTSvcs/bin/CampusCluster/open" ----> 1.0
 "/opt/VRTSvcs/bin/CampusCluster/CampusCluster.xml" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/monitor" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/info" ----> 1.0
 "/opt/VRTSvcs/bin/ScriptAgent" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/RVG.xml" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/offline" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/online" ----> 1.0
 "/opt/VRTSvcs/bin/RVG/clean" ----> 1.0
 "/opt/VRTSvcs/bin/internal_triggers/cpuusage" ----> 1.0

 Backup of files on host lnode2 complete

 Backup succeeded partially

To check the contents of the snapshot, the unzip utility can be run with the “-t” option:


 # unzip -t clusterbackup.zip |more
 Archive: clusterbackup.zip
 testing: /cat_vcs.zip OK
 testing: /categorylist.xml.zip OK
 testing: _repository__data/vcs/foo/lnode2/etc/VRTSvcs/conf/config/types.cf.zip OK
 testing: _repository__data/vcs/foo/lnode2/etc/VRTSvcs/conf/config/main.cf.zip OK
 testing: _repository__data/vcs/foo/lnode2/etc/VRTSvcs/conf/config/vcsApacheTypes.cf.z ip OK
 testing: _repository__data/vcs/foo/lnode2/etc/llthosts.zip OK
 testing: _repository__data/vcs/foo/lnode2/etc/gabtab.zip OK
 testing: _repository__data/vcs/foo/lnode2/etc/llttab.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/vcsenv.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/monitor.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/offline.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/online.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/clean.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/LVMVolumeGro upAgent.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/LVMVolumeGroup/LVMVolumeGro up.xml.zip OK
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/RVGSnapshot/fdsched.zip O K
 testing: _repository__data/vcs/foo/lnode2/opt/VRTSvcs/bin/RVGSnapshot/monitor.zip O K
 ......

Since parts of the cluster configuration ran reside in memory and not on disk, it is a good idea to run “haconf -dump -makero” prior to running hasnap. This will ensure that the current configuration is being backed up, and will allow hasnap “-restore” to restore the correct configuration if disaster hits.


No comments:

Post a Comment