How to create a batch file out of an existing main.cf configuration using the hacf command.
In VERITAS Cluster Server, the configuration file main.cf holds information about the cluster and its resources. Every bit of configuration information may be entered from the command line using ha commands, manually added to the main.cf file, or configured with VERITAS Cluster Manager. It may become necessary to convert a main.cf file into a batch file that contains the commands needed to create or modify a cluster.
This may be useful in a testing environment, a configuration environment, or to quickly configure a production cluster to mirror a test cluster. This can be especially useful when used in conjunction with VERITAS Configuration Editor for troubleshooting and repair purposes.
The following demonstrates creating the main.cmd batch file:
1. Drop to a command prompt: Start > Run, then type cmd.exe
2. Change directories to the configuration directory (i.e. cd %VCS_ROOT%\cluster server\conf\config)
3. Type hacf -cftocmd .\ -dest .\
This command will create a main.cmd file in your current directory. In order to specify another directory, replace the .\ after -dest with the directory of your choosing.
The command may also be reversed. To create a main.cf file out of a main.cmd file, simply replace the -cftocmd with a -cmdtocf. This will parse the cmd file and create the necessary cf file.
Imported Document Id