Files
docs/doc/source/backup/kubernetes/running-ansible-backup-playbook-locally-on-the-controller.rst
Elaine Fonaro d429c05145 Running Ansible Backup paragraphs were updated.
Code block added line 24.

Signed-off-by: Elaine Fonaro <elaine.fonaro@windriver.com>
Change-Id: Ia0816f8a9eb0a6d35d1d890d56cf9c60774574a8
(cherry picked from commit fd759b6b01)
2022-03-31 17:45:07 +00:00

2.5 KiB

Run Ansible Backup Playbook Locally on the Controller

In this method the Ansible Backup playbook is run on the active controller.

Use the following command to run the Ansible Backup playbook and back up the configuration, data, and user container images in registry.local data:

~(keystone_admin)]$ ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e "ansible_become_pass=<sysadmin password> admin_password=<sysadmin password>" -e "backup_user_local_registry=true"

The <admin_password> and <ansible_become_pass> need to be set correctly using the -e option on the command line, or an override file, or in the Ansible secret file.

An example of override file follows:

cat << EOF > localhost-backup.yaml
---
ansible_become_pass: "<admin_password>"
admin_password: "<admin_password>"
backup_user_local_registry: "true"
...
EOF

The output files will be named:

  • inventory_hostname_platform_backup_timestamp.tgz
  • inventory_hostname_wr-openstack_backup_timestamp.tgz
  • inventory_hostname_docker_local_registry_backup_timestamp.tgz
  • inventory_hostname_dc_vault_backup_timestamp.tgz

The variables prefix can be overridden using the -e option on the command line or by using an override file.

  • platform_backup_filename_prefix
  • openstack_backup_filename_prefix
  • docker_local_registry_backup_filename_prefix
  • dc_vault_backup_filename_prefix
  • openstack_app_name: "" (optional for application backup)

The generated backup tar files will be displayed in the following format, for example:

  • localhost_docker_local_registry_backup_2020_07_15_21_24_22.tgz
  • localhost_platform_backup_2020_07_15_21_24_22.tgz
  • localhost_openstack_backup_2020_07_15_21_24_22.tgz
  • localhost_dc_vault_backup_2020_07_15_21_24_22.tgz

These files are located by default in the /opt/backups directory on controller-0, and contains the complete system backup.

If the default location needs to be modified, the variable backup_dir can be overridden using the -e option on the command line or by using an override file.