Manual Pages


Table of Contents

NAME

na_config - Commands for configuration management.

SYNOPSIS

config clone <node_name> <remote_user>

config diff [-o <output_file>] <config_file1> [ <config_file2> ]

config dump [-f] [-v] <config_file>

config restore [-v] <config_file>

DESCRIPTION

The config command is used for managing the configuration of a node. It allows the user to backup, restore and clone the configuration of a node.

The config clone <node_name> <remote_user> command is used to clone the configuration of a node, node. Cloning operation reverts back the node to the old configuration, if something goes wrong. Node instance specific information like network interface information (ip address, netmask and so on), /etc/rc file, license codes and serial number and so on are not cloned. The registry key "default.options.clone.exclude" lists the set of prefixes that are not cloned. At present, we are not cloning the keys, whose prefixes match one of the following prefixes: file.contents.rc, file.contents.hosts, options.if, options.hosts, options.license,

options.system.hostname,
options.vfconfig, state.license_SSN. We are also not cloning the volume specific configuration (keys in the options.vols.* namespace). After running this command, reboot the node for the configuration changes to take effect.

The argument remote_user is specified in the following format: username:passwd, where username is the name of the remote user account and passwd is the password of the remote user account.

The config diff [-o <output_file>] <config_file1> [ <config_file2> ] command finds out the differences between the specified configuration files config_file1 and config_file2. It prints out all the key-value pair mismatches in alphabetical order. This command helps the administrators in configuration auditing. This is also useful to compare the configuration files of the partners in a controller failover setup to detect configuration mismatches. Use -o option to redirect the output of this command to a file output_file.

The config dump [-f] [-v] <config_file> command backs up the node configuration into the specified config_file. Configuration is stored as a set of name-value pairs in the backup file. By default, this command backs up only the node specific (head-specific) configuration. Use -v option for backing up the volume specific configuration also. Use -f option for overriding an existing backup file forcefully.

The config restore [-v] <config_file> command restores the node configuration information from a backup configuration file, config_file. By default, this command restores only the node specific configuration available in the config_file. Use -v option, for restoring the volume specific configuration also. After running this command, reboot the node for the configuration changes to take effect.

In some cases, restore operation may not succeed because the previously saved configuration information is no longer valid. For example, a previous configuration included information about a volume that no longer exists or specifies values (for example snapshot reserve) that can no longer be met. In these cases, restore operation reverts the node to the old configuration.

For this command, config_file can also be specified as a HTTP URL location, to restore the configuration from remote files. But, config dump command doesn't support backing up the configurations to a remote location. This will be supported in future releases. HTTP URL location is specified in the following format:

http://[remote_user@]hostname[:port]/path_to_the_backup_file where

remote_user specifies the credentials for the basic http authentication and should be in the following form: username[:passwd]

hostname is the name of the http server, like www.mycompany.com.

port is the http port value. If this is not specified, default value 80 (default http port) is used.

path_to_the_backup_file specifies the location of the backup file on the http server.

Note: The configuration file argument {config_file} specified in all the above commands can be one of the following types:

a) A simple file name - this would get saved by default as a file in the /etc/configs directory.

b) A full-path file name.

c) Just a `-'. In this case, it indicates either standard input or standard output. This value can only be used with config dump and config restore commands. When used with config dump command, the whole node configuration is written on to the standard output. When used with config restore command, node configuration information is read from the standard input.

EXAMPLES

Here are a few examples of the use of the config command.
  1. FAS> config clone foo1 root:xxxx
  Clones the remote node, "foo1's" configuration on to the
  node executing the clone command, i.e. on to "Node".

  2. FAS> config diff 11_30_2000
  Compares the node's current configuration with the configuration
  information available in the backup file /etc/configs/11_30_2000.

  3. FAS> config diff 11_30_2000 12_04_2000
  Compares the configuration information available in the backup
  files /etc/configs/11_30_2000 and /etc/configs/12_04_2000.

  4. Assume that test1.cfg and test2.cfg are two sample config files
  with the contents shown below:

       sample test1.cfg file:
          options.auditlog.enable=on
          options.autosupport.enable=off
          file.contents.hosts.equiv=\\
          #Auto-generated by setup Sun May 27 23:46:58 GMT 2001
          testnode1
          \\

       sample test2.cfg file:
          options.autosupport.enable=on
          options.sysconfig.boot_check=on
          options.sysconfig.boot_errors=console,syslog,autosupport
          file.contents.hosts.equiv=\\
          #Auto-generated by setup Sun May 27 20:12:12 GMT 2001
          testnode2
          \\


  Following command displays the differences between the above
  two config files.

  FAS> config diff test1.cfg  test2.cfg
  ## deleted
  < options.auditlog.enable=on
  ## changed
  < options.autosupport.enable=off
  ---
  > options.autosupport.enable=on
  ## new
  > options.sysconfig.boot_check=on
  ## new
  > options.sysconfig.boot_errors=console,syslog,autosupport
  ## changed
  < file.contents.hosts.equiv=\\
  #Auto-generated by setup Sun May 27 23:46:58 GMT 2001
  testnode1
  \\
  ---
  > file.contents.hosts.equiv=\\
  #Auto-generated by setup Sun May 27 20:12:12 GMT 2001
  testnode2
  \\

  5. FAS> config dump 11_30_2000
  Backs up the node specific configuration in /etc/configs/11_30_2000.

  6. FAS> config dump /home/user/12_04_2000
  Backs up the node specific configuration in /home/user/12_04_2000.

  7. FAS> config dump -v 12_12_2000
  Backs up the entire node (node specific and volume specific)
  configuration in /etc/configs/12_12_2000.

  8. FAS> config restore 11_30_2000
  Restores the node specific configuration from /etc/configs/11_30_2000.

  9. FAS> config restore /home/user/12_04_2000
  Restores the node specific configuration from /home/user/12_04_2000.

  10. FAS> config restore -v /home/user/12_04_2000
  Restores the entire node (node specific and volume specific)
  configuration from /home/user/12_04_2000.

  11. FAS> config restore http://root:hello@www.foo.com/backup_12_04_2000
  Restores the node specific configuration from a remote file,
  backup_12_04_2000, available on the http server www.foo.com.


Table of Contents