3.7. Backing up and restoring a cluster configuration
The following commands back up a cluster configuration in a tar archive and restore the cluster configuration files on all nodes from the backup.
Procedure
Use the following command to back up the cluster configuration in a tar archive. If you do not specify a file name, the standard output will be used.
# pcs config backup filename注意The
pcs config backupcommand backs up only the cluster configuration itself as configured in the CIB; the configuration of resource daemons is out of the scope of this command. For example if you have configured an Apache resource in the cluster, the resource settings (which are in the CIB) will be backed up, while the Apache daemon settings (as set in`/etc/httpd`) and the files it serves will not be backed up. Similarly, if there is a database resource configured in the cluster, the database itself will not be backed up, while the database resource configuration (CIB) will be.Use the following command to restore the cluster configuration files on all cluster nodes from the backup. Specifying the
--localoption restores the cluster configuration files only on the node from which you run this command. If you do not specify a file name, the standard input will be used.# pcs config restore [--local] [filename]