此内容没有您所选择的语言版本。

Chapter 4. Execute the Back Up Procedure


Before performing a fast forward upgrade, back up the undercloud and the overcloud Control Plane nodes so that they can be restored to their previous state should an error occur.

4.1. Back Up the Undercloud

To back up the undercloud node, execute the following as root in the command line interface of the undercloud node:

# rear -d -v mkbackup

The procedure creates an ISO image on the backup node under the /ctl_plane_backups directory.

4.2. Back up the control plane

To back up the control plane, you must first stop the pacemaker cluster. This can result in service interruption. You must back up the database as a precaution to ensure that you can restore it after you restore the control plane. Back up the control plane nodes simultaneously and avoid operating the stack to ensure state consistency. After you complete the backup procedure, start the pacemaker cluster.

  1. Locate the database password:

    # /bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password
  2. Back up the databases:

    [heat-admin@overcloud-controller-x ~]$ mysql -uroot -p{{ mysql_root_password }} -s -N -e "select distinct table_schema from information_schema.tables where engine='innodb' and table_schema != 'mysql';" | xargs mysqldump -uroot -p{{ mysql_root_password }} --single-transaction --databases > openstack-backup-mysql.sql
    [heat-admin@overcloud-controller-x ~]$ mysql -uroot -p{{ mysql_root_password }} -s -N -e "SELECT CONCAT('\"SHOW GRANTS FOR ''',user,'''@''',host,''';\"') FROM mysql.user where (length(user) > 0 and user NOT LIKE 'root')" | xargs -n1 mysql -uroot -p{{ mysql_root_password }} -s -N -e | sed 's/$/;/' > openstack-backup-mysql-grants.sql
  3. Stop the pacemaker cluster and the OpenStack services:

    Important

    This procedure results in the temporary interruption of control plane services to Compute nodes. You will not be able to spin up new instances, migrate instances, authenticate requests or monitor the health of the cluster until you restore the pacemaker cluster and OpenStack services in the final step of this procedure.

    On one of the control plane nodes, enter the following command:

    # pcs cluster stop --all

    On each control plane node, stop the OpenStack services:

    # systemctl stop openstack-*
    # systemctl stop neutron-*
    # systemctl stop haproxy
    # systemctl stop httpd
  4. To back up the control plane, execute the following as root in the command line interface of each control plane node:

    # rear -d -v mkbackup

    The procedure creates an ISO image on the backup node under the /ctl_plane_backups directory.

  5. When the backup procedure generates ISO images for each of the control plane nodes, restart the control plane nodes:

    # reboot

    After you restart the control plane nodes, check the status of pacemaker to ensure that the services are running correctly:

    # pcs status
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.