Chapter 1. Backing up the director undercloud

To minimize data loss and system downtime, you can create and recover backups of the database and critical filesystems that run on the Red Hat OpenStack Platform (RHOSP) director undercloud node.

To validate the success of the completed backup process, you can run and validate the restoration process. For more information, see Chapter 2, Restoring the director undercloud.

1.1. Backing up a containerized undercloud

A full undercloud backup includes the following databases and files:

  • All MariaDB databases on the undercloud node
  • MariaDB configuration file on the undercloud so that you can accurately restore databases
  • The configuration data: /etc
  • Log data: /var/log
  • Image data: /var/lib/glance
  • Certificate generation data if using SSL: /var/lib/certmonger
  • Any container image data: /var/lib/containers and /var/lib/image-serve
  • All swift data: /srv/node
  • All data in the stack user home directory: /home/stack


  • You have a minimum of 3.5 GB of available space on the undercloud for the archive file.


  1. Log in to the undercloud as the root user.
  2. Retrieve the MySql root password:

    [root@director ~]# PASSWORD=$(/bin/hiera -c /etc/puppet/hiera.yaml mysql::server::root_password)
  3. Perform the backup:

    [root@director ~]# podman exec mysql bash -c "mysqldump -uroot -p$PASSWORD --opt --all-databases" > /root/undercloud-all-databases.sql
  4. Archive the database backup and the configuration files:

    [root@director ~]# cd /backup
    [root@director backup]# tar --xattrs --xattrs-include='*.*' --ignore-failed-read -cf \
        undercloud-backup-`date +%F`.tar \
        /root/undercloud-all-databases.sql \
        /etc \
        /var/log \
        /var/lib/glance \
        /var/lib/certmonger \
        /var/lib/containers \
        /var/lib/image-serve \
        /var/lib/config-data \
        /srv/node \
        /root \
    • The --ignore-failed-read option skips any directory that does not apply to your undercloud.
    • The --xattrs option includes extended attributes, which are required to store metadata for Object Storage (swift).

    This command creates a file named undercloud-backup-<timestamp>.tar, where _<timestamp>_ is the system date. Copy this tar file to a secure location.