Back up OpenStack

StarlingX OpenStack is backed up using the StarlingX back-up facilities.

Note

For Distributed Cloud systems, the complete subcloud platform and OpenStack backup and restore is managed by the DCManager on the Centralized Cloud.

Overview

The backup playbook will produce a OpenStack backup tarball in addition to the platform tarball. This can be used to perform StarlingX OpenStack restores independently of restoring the underlying platform.

The stx-openstack backup can be performed using the following command:

$ ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "ansible_become_pass=<sysadmin password> admin_password=<sysadmin password> openstack_app_name=|prefix|-openstack skip_os_dbs=['Database','information_schema','performance_schema','mysql','horizon','panko','gnocchi','sys']"

Note

Data stored in Ceph such as Glance images, Cinder volumes or volume backups or Rados objects (images stored in ceph) are not backed up automatically.

  • To backup glance images use the image_backup.sh script. For example:

    ~(keystone_admin)$ image-backup export <uuid>
    
  • To back-up other Ceph data such as cinder volumes, backups in ceph or rados objects use the rbd export command for the data in OpenStack pools cinder-volumes, cinder-backup and rados.

    For example if you want to export a Cinder volume with the ID of: 611157b9-78a4-4a26-af16-f9ff75a85e1b you can use the following command:

    ~(keystone_admin)$ rbd export -p cinder-volumes
    611157b9-78a4-4a26-af16-f9ff75a85e1b
    /tmp/611157b9-78a4-4a26-af16-f9ff75a85e1b
    

    To see the Cinder volumes, use the openstack volume-list command.

    After export, copy the data off-box for safekeeping.

For details on performing a StarlingX back-up, see Back Up System Data Overview.

Back Up a DC Subcloud Platform and OpenStack Application

Back up subcloud system data and OpenStack application data by storing the backup files in the default local storage.

  1. Create a backup_values.yaml file and specify the OpenStack application name:

    cat << EOF > backup_values.yaml
    openstack_app_name: |prefix|-openstack
    EOF
    
  2. Run the following command, including the --local-only and --backup-values parameters:

    dcmanager subcloud-backup create \
      --subcloud <subcloud> \
      --sysadmin-password <sysadmin-password> \
      --backup-values backup_values.yaml \
      --local-only
    

The system generates the subcloud_platform_backup and openstack_backup files on the subcloud in the following location:

/opt/platform-backup/backups/<release>/