2.5. 创建 control plane 节点的备份


要创建 control plane 节点的备份,请使用 backup-and-restore Ansible 角色。然后,当节点损坏或无法访问时,您可以使用备份将 control plane 节点恢复到之前的状态。control plane 节点的备份包括在 control plane 节点上运行的数据库备份。

先决条件

流程

  1. 在每个 control plane 节点上,以 root 用户身份备份每个节点的 config-drive 分区:

    [root@controller-x ~]$ dd if=<config_drive_partition> of=/mnt/config-drive
    Copy to Clipboard Toggle word wrap
  2. 在 undercloud 节点上,创建以下 Ansible playbook:

    (undercloud) [stack@undercloud ~]$ cat <<'EOF' > ~/bar_rear_create_restore_images-controller.yaml
    # Playbook
    # Using ReaR on the control plane nodes.
    - become: true
      hosts: ceph_mon
      name: Backup ceph authentication
      tasks:
        - name: Backup ceph authentication role
          include_role:
            name: backup-and-restore
            tasks_from: ceph_authentication
          tags:
          -  bar_create_recover_image
    - become: true
      hosts: Controller
      name: Create the recovery images for the control plane
      roles:
      - role: backup-and-restore
    EOF
    Copy to Clipboard Toggle word wrap
  3. 在 undercloud 节点上,输入以下 ansible-playbook 命令来创建 control plane 节点的备份:

    (undercloud) [stack@undercloud ~]$ ansible-playbook \
        -v -i ~/tripleo-inventory.yaml \
        --extra="ansible_ssh_common_args='-o StrictHostKeyChecking=no'" \
        --become \
        --become-user root \
        --tags bar_create_recover_image \
        ~/bar_rear_create_restore_images-controller.yaml
    Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部