Back up and restore your containerized deployment
Protecting your Ansible Automation Platform containerized deployment ensures that you can recover from system failures, data corruption, or configuration errors. Regular backups minimize downtime and protect your configurations and data.
Implementing backup and restore procedures helps you to:
- Protect critical automation assets: Safeguard your data including configurations, inventory, credentials, and job history from unexpected failures or data loss.
- Enable disaster recovery: Restore your environment quickly after hardware failures or other unexpected events to maintain business continuity.
- Support testing and development: Create copies of your environment for testing upgrades or configuration changes without affecting production systems.
Back up containerized Ansible Automation Platform Copy linkLink copied!
Perform a backup of your container-based installation of Ansible Automation Platform.
Before you begin Copy linkLink copied!
- You have logged in to the Red Hat Enterprise Linux host as your dedicated non-root user.
About this task Copy linkLink copied!
- When backing up Ansible Automation Platform, use the installation program that matches your currently installed version of Ansible Automation Platform.
- Backup functionality only works with the PostgreSQL versions supported by your current Ansible Automation Platform version.
- Backup and restore for content stored in Azure Blob Storage or Amazon S3 must be handled through the vendor portals, as each vendor provides their own backup solutions.
Procedure Copy linkLink copied!
What to do next Copy linkLink copied!
To customize the backup process, you can use the following variables in your inventory file:
- Change the backup destination directory from the default
./backupsby using thebackup_dirvariable. -
Exclude paths that contain duplicated data, such as snapshot subdirectories, by using the
hub_data_path_excludevariable.For example, to exclude a
.snapshotssubdirectory from the backup, add the following to your inventory file:hub_data_path_exclude=["*/.snapshots", "*/.snapshots/*"]Alternatively, you can pass this variable at runtime by using the
-eflag:$ ansible-playbook -i inventory ansible.containerized_installer.backup -e hub_data_path_exclude="['*/.snapshots', '*/.snapshots/*']"You can also define the exclusion patterns in a YAML extra variables file and pass it at runtime:
exclude_vars.yml
hub_data_path_exclude: - "*/.snapshots/*" - "*/.snapshots"$ ansible-playbook -i inventory ansible.containerized_installer.backup -e @exclude_vars.yml
Restore containerized Ansible Automation Platform Copy linkLink copied!
Restore your container-based installation of Ansible Automation Platform from a backup, or to a different environment.
Before you begin Copy linkLink copied!
- You have logged in to the Red Hat Enterprise Linux host as your dedicated non-root user.
- You have a backup of your Ansible Automation Platform deployment. For more information, see Back up containerized Ansible Automation Platform.
- If restoring to a different environment with the same hostnames, you have performed a fresh installation on the target environment with the same topology as the original (source) environment.
- You have ensured that the administrator credentials on the target environment match the administrator credentials from the source environment.
About this task Copy linkLink copied!
When restoring Ansible Automation Platform, use the latest installation program available at the time of the restore. For example, if you are restoring a backup taken from version 2.6-1, use the latest 2.6-x installation program available at the time of the restore.
Restore functionality only works with the PostgreSQL versions supported by your current Ansible Automation Platform version. For more information, see System requirements.