Configuration Files

From wiki.zmanda.com
Jump to navigation Jump to search

For easy configuration, ZRM for MySQL follows one common method of configuration for almost everything. It uses configuration files to specify the parameters that need to be used for a backup run.

  • ZRM for MySQL configuration files are located under /etc/mysql-zrm directory.
  • All backup parameters applicable for all backup sets are specified in a global configuration file - /etc/mysql-zrm/mysql-zrm.conf.
  • Parameters that are specific to a backup set are specified in /etc/mysql-zrm/<backup set name>/mysql-zrm.conf.
  • All parameters in the ZRM for MySQL configuration file are optional and ZRM for MySQL will use the MySQL client file (my.cnf) parameters if needed.
  • Backup set specific parameters will override the parameters specified in the global configuration file.
  • In addition, parameters can be specified on the command line and these will override that given in the configuration files.
  • All lines starting with # are treated as comments.
  • Since the MySQL user and password in plain-text has to be provided in the configuration files, care should be taken to protect the configuration file from unauthorized access.


Global Configuration File

  • ZRM for MySQL provides a Global Configuration file which resides in a default directory on the local machine where it is being run.
  • The global configuration file is called /etc/mysql-zrm/mysql-zrm.conf.
  • The values stored in the Global Configuration file are read each time ZRM for MySQL is run.
  • They can be edited and will then apply to all subsequent runs.

Backup Set Specific Configuration File

  • Backup sets are identified by their unique name.
  • The configuration file for each backup set is expected to be in /etc/mysql-zrm/<backup set name>/mysql-zrm.conf
  • ZRM for MySQL allows you to create a Configuration file for each Backup set . This is stored separately from the Global Configuration file and is read only when ZRM for MySQL runs that specific backup set.
  • Backup set specific parameters supplement the Global File parameters when there is no conflict between the two set of parameters.
  • They over-ride the Global File parameters when there is a conflict.
  • The backup is then executed in terms of combined parameters from the Global file and the Backup set specific configuration file.

Command Line Parameters

  • It is possible to pass on parameters to the Specific Backup set execution by specifying them on the command line.
  • You can also put the configuration parameters and pass it to ZRM for MySQL by specifying the option --option-file <fully qualified name of file> on the command line.
  • They will over-ride parameters in the configuration files in case of conflict.

Built in Defaults

  • To minimize the task of setting up the Configuration files, ZRM for MySQL uses default values where none are specified.
  • If a specific parameter is not specified either in the global configuration or the specific backup-set configuration file or on the command line, the default values are used.

Logs

  • Without the user having to specify it, ZRM for MySQL generates logs files while Backing up /recovering/ restoring data.
  • These log files can be very handy to understand the reasons for failures.
  • When --verbose option is specified, you get detailed messages in the logs.