Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 2. Backing up important files
Backing up important configuration files, inventory files, and modified playbooks makes it easy to restore or redeploy your cluster.
Red Hat recommends backing up your configuration after initial deployment, and after confirming the success of any major changes in your cluster. You can also take backups after a node has failed if necessary.
Prerequisites
-
Example playbooks and inventory files are stored in the
/etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deploymentdirectory. If you have manually created or modified inventory and playbook files and you are not storing them in this directory, ensure that you know the path to their location.
Procedure
- Log in to a hyperconverged host as the root user.
Change into the
hc-ansible-deploymentdirectory and back up the defaultarchive_config_inventory.ymlfile.cd /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment cp archive_config_inventory.yml archive_config_inventory.yml.bk
# cd /etc/ansible/roles/gluster.ansible/playbooks/hc-ansible-deployment # cp archive_config_inventory.yml archive_config_inventory.yml.bkCopy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
archive_config_inventory.ymlfile with details of the cluster you want to back up.- hosts
- The backend FQDN of each host in the cluster that you want to back up.
- backup_dir
- The directory in which to store backup files.
- nbde_setup
-
If you use Network-Bound Disk Encryption, set this to
true. Otherwise, set tofalse. - upgrade
-
Set to
false.
For example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
archive_config.ymlplaybook using your updated inventory file with thebackupfilestag.ansible-playbook -i archive_config_inventory.yml archive_config.yml --tags=backupfiles
# ansible-playbook -i archive_config_inventory.yml archive_config.yml --tags=backupfilesCopy to Clipboard Copied! Toggle word wrap Toggle overflow This creates an archive in the
/rootdirectory specific to each host FQDN in thehostssection of the inventory, for example,/root/rhvh-node-host1-backend.example.com-backup.tar.gz.Transfer the backup archives to a different machine.
scp /root/rhvh-node-host1-backend.example.com-backup.tar.gz backup-host.example.com:/backups/
# scp /root/rhvh-node-host1-backend.example.com-backup.tar.gz backup-host.example.com:/backups/Copy to Clipboard Copied! Toggle word wrap Toggle overflow