Chapter 1. Backing up your Red Hat OpenStack Platform cluster by using the Snapshot and Revert tool Snapshots preserve the original disk state of your Red Hat OpenStack Platform (RHOSP) cluster before you perform an upgrade or an update from RHOSP 17.1 or later. You can then remove or revert the snapshots depending on the results. For example, if an upgrade completed successfully and you do not need the snapshots anymore, remove them from your nodes. If an upgrade fails, you can revert the snapshots, assess any errors, and start the upgrade procedure again. A revert leaves the disks of all the nodes exactly as they were when the snapshot was taken. The RHOSP Snapshot and Revert tool is based on the Logical Volume Manager (LVM) snapshot functionality and is only intended to revert an unsuccessful upgrade or update. Important The snapshots are stored on the same hard drives as the data you have stored on your disks. As a result, the Snapshot and Revert tool does not prevent data loss in cases of hardware failure, data center failure, or inaccessible nodes. You can take snapshots of Controller nodes and Compute nodes. Taking snapshots of the undercloud is not supported. 1.1. Creating a snapshot of Controller and Compute nodes Create a snapshot of your Controller and Compute nodes before performing an upgrade or update. You can then remove or revert the snapshots depending on the results of those actions. Note You can create only one snapshot of your Controller and Compute nodes. To create another snapshot, you must remove or revert your snapshot. Prerequisites You have LVM enabled on the node. The following default set of LVM logical volumes defined by a RHOSP installation are present: /dev/vg/lv_audit /dev/vg/lv_home /dev/vg/lv_log /dev/vg/lv_root /dev/vg/lv_srv /dev/vg/lv_var You can run the lvs , lvscan , or lvdisplay commands to confirm whether your environment includes these prerequisites before you make changes to the node disks. Note These prerequisites are included with the default installation of a 17.1 cluster. However, if you upgraded to RHOSP 17.1 from an earlier RHOSP version, your control plane does not include these prerequisites because they require reformatting of the disk. Procedure Log in to the undercloud as the stack user. Source the stackrc undercloud credentials file: If you have not done so before, extract the static Ansible inventory file from the location in which it was saved during installation: Replace <stack> with the name of your stack. By default, the name of the stack is overcloud . Take the snapshots: If your upgrade or update was successful, remove the snapshots: Important Removing snapshots is a critical action. Remove the snapshots if you do not intend to revert the nodes, for example, after an upgrade completes successfully. If you retain snapshots on the nodes for too long, they degrade disk I/O performance. If your upgrade or update failed, revert the snapshots: Reboot each node that you reverted so the changes are applied to the filesystem. The revert option automatically deletes the snapshots.

Commands:
[stack@undercloud ~]USD source stackrc (undercloud) [stack@undercloud ~]USD
(undercloud) [stack@undercloud ~]USD cp ~/overcloud-deploy/<stack> /tripleo-ansible-inventory.yaml ~/tripleo-inventory.yaml
(undercloud) [stack@undercloud ~]USD openstack overcloud backup snapshot --inventory ~/tripleo-inventory.yaml
(undercloud) [stack@undercloud ~]USD openstack overcloud backup snapshot --remove --inventory ~/tripleo-inventory.yaml
(undercloud) [stack@undercloud ~]USD openstack overcloud backup snapshot --revert --inventory ~/tripleo-inventory.yaml