Overview of Backup Operations Demos
Overview
Backup Demos in the playbooks directory provide examples of how to perform backup operations on AIX systems using Ansible. These demos include tasks for creating volume groups, logical volumes, and filesystems, as well as mounting and unmounting filesystems. They also demonstrate how to create, view, and move backup images.
Backup Operations on rootvg
The playbooks/demo_backup_rootvg.yml playbook demonstrates how to back up the root volume group (rootvg) using the mksysbalt_disk_mksysbmksysb
The playbook playbooks/demo_backup_rootvg.yml starts by defining the hosts and remote user for the backup operations.
- name: "Backup operations on rootvg using mksysb and alt_disk_mksysb for AIX"
hosts: ansible-test1
remote_user: root
Backup Operations on datavg
The playbooks/demo_backup_datavg.yml playbook demonstrates backup operations on a data volume group (datavg) using the savevgrestvgsavevgrestvg
Main Functions
There are several main functions in the backup demos, including creating volume groups, creating logical volumes, creating filesystems, mounting filesystems, creating backup images, viewing backup images, moving backup images, unmounting filesystems, deleting volume groups, and restoring backup images. Below, we will dive into creating, viewing, and restoring backup images.
Create Backup Images
The create backup images function is used to create a mksysbibm.power_aix.backupcreate
The task for creating a mksysbplaybooks/demo_backup_rootvg.yml playbook.
- name: Create a mksysb image of rootvg
ibm.power_aix.backup:
action: create
type: "{{ type }}"
location: "{{ location_create }}"
exclude_files: "{{ exclude_files }}"
extend_fs: "{{ extend_fs }}"
exclude_packing_files: "{{ exclude_packing_files }}"
flags: "{{ mksysb_flags }}"
force: "{{ force }}"
register: result
View Backup Images
The view backup images function is used to view the details of the created mksysbibm.power_aix.backupview
The task for viewing the mksysbplaybooks/demo_backup_rootvg.yml playbook.
- name: View the mksysb image
ibm.power_aix.backup:
action: view
type: "{{ type }}"
location: "{{ location_create }}"
register: result
- ansible.builtin.debug:
var: result
Restore Backup Images
The restore backup images function is used to restore a savevgibm.power_aix.backuprestore
The task for restoring a savevgplaybooks/demo_backup_datavg.yml playbook.
- name: Restvg to restore the backup image
ibm.power_aix.backup:
action: restore
type: "{{ type_v }}"
name: "{{ disk_name_v }}"
location: "{{ location_v }}"
data_file: "{{ data_file_v }}"
exclude_data: "{{ exclude_data_v }}"
minimize_lv_size: "{{ minimize_lv_size_v }}"
flags: "{{ restvg_flags_v }}"
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human