osp16_undercloud_backup

osp16_undercloud_backup

This role create a backup of Red Hat Openstack 16 undercloud backup as reported in https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/back_up_and_restore_the_director_undercloud/index#backing-up-a-containerized-undercloud

Note:

  • the backup file generated by this role can take several gigabyte of space, verifiy that there is enough space in the destination directory- you can avoid to backup some directories changing the values of role variables

Requirements

This role has been tested on Red Hat Openstack 16.0

Role Variables

Optional

  • osp16_undercloud_backup_destination_dir:

    description: Backup destination dir

    default value: "/home/stack"

  • osp16_undercloud_backup_destination_filename_format:

    description: Backup destination filename

    default value: "osp16_undercloud_bck_{{ lookup('pipe','date +%Y%m%d_%H%M') }}"

  • osp16_undercloud_backup_enable_backup_db:

    description: Enable/Disable the undercloud database backup

    default value: true

  • osp16_undercloud_backup_enable_backup_dir:

    description: Enable/Disable the backup of the directories listed in osp16_undercloud_backup_source_directory

    default value: true

  • osp16_undercloud_backup_compress:

    description: Compress the backup in a tar.gz file

    default_value: true

  • osp16_undercloud_backup_source_directory:

    description: The list of directory object of the backup

    default_value:
    - /etc - /var/log - /var/lib/glance - /var/lib/certmonger/ - /var/lib/containers - /var/lib/image-serve - /srv/node - /home/stack - /root

Dependencies

tar already installed

Example Playbook

- name: Create a compressed backup of database dump only in a specific directory
  hosts: undercloud
  roles:
    - role: osp16_undercloud_backup
      vars:
        osp16_undercloud_backup_destination_dir: /home/stack/backup
        osp16_undercloud_backup_enable_backup_dir: false        
- name: Create a not compressed backup of database dump, /etc and /home/stack directory
  hosts: undercloud
  roles:
    - role: osp16_undercloud_backup
      vars:
        osp16_undercloud_backup_compress: false
        osp16_undercloud_backup_source_directory:
          - /etc
          - /home/stack

License

GPL-3.0

Author Information

About

Ansible role to perform Red Hat Openstack 16 undercloud backup

Install
ansible-galaxy install giovannisciortino/osp16_undercloud_backup
GitHub repository
License
gpl-3.0
Downloads
28