viosbr – Backup/Restore the configuration of the VIOS¶
Synopsis¶
Performs the operations for backing up and restoring the virtual and logical configuration of the Virtual I/O Server (VIOS).
Requirements¶
The below requirements are needed on the host that executes this module.
VIOS >= 2.2.5.0
Python >= 2.7
Parameters¶
- action (True, str, None)
Specifies the operation to perform on the VIOS.
backup
to perform a backup.
restore
to restore a backup file.
recoverdb
to recover from a corrupted shared storage pool (SSP) database.
migrate
to migrate a backup file from an older release level to a current release level. A new file is created with_MIGRATED
string appended to the given file name.
dr
to recover the cluster on another geographic location.
list
to view the listing of backup files.- file (optional, str, None)
Specifies the file name of the file that has backup information.
For backup, compressed file is created with
.tar.gz
extension.For cluster backups, compressed file is created with
<clustername>.tar.gz
extension.If file name is a relative path, file is created under
/home/padmin/cfgbackups
.- dir (optional, str, None)
User-specified location from where to list backup files when action=list.
- devtype (optional, str, None)
Only restore devices of the specified type.
- clustername (optional, str, None)
Specifies the cluster name to back up or restore, including all of its associated nodes.
- subfile (optional, str, None)
Specifies the node configuration file to be restored.
- currentdb (optional, str, None)
Restores the cluster without restoring the database from the backup.
When restoring mapping, some of the mapping can fail if the mappings are not in the current database.
- force (optional, bool, False)
Attempts to restore a device even if it has not been successfully validated.
- repopvs (optional, list, None)
List of hdisks to be used as repository disks for restoring the cluster.
The given disks must not contain a repository signature.
- skipcluster (optional, bool, False)
Restores all local devices, except cluster0.
- skipdevattr (optional, bool, False)
Skips the restore of the physical device attributes.
Does not modify the current system’s physical device attributes.
- validate (optional, bool, False)
Validates the devices on the server against the devices on the backed-up file.
Fails the restore operation if items do not validate successfully.
Notes¶
Note
The restore action must be run on the same VIOS partition as the one where the backup was performed.
Examples¶
- name: Back up all the device attributes and logical and virtual device mappings
on the VIOS file /tmp/myserverbackuperform.tar.gz
viosbr:
action: backup
file: /tmp/myserverbackuperform
- name: Restore all the possible devices and display a summary of deployed and nondeployed devices
viosbr:
action: restore
file: /home/padmin/cfgbackups/myserverbackup.002.tar.gz
- name: Back up a cluster and all the nodes that are up
viosbr:
action: backup
clustername: mycluster
file: systemA
- name: Restore a particular node within the cluster
viosbr:
action: restore
clustername: mycluster
file: systemA.mycluster.tar.gz
subfile: myclusterMTM8233-E8B02HV32001P3.xml
- name: Restore a cluster and its nodes
viosbr:
action: restore
clustername: mycluster
file: systemA.mycluster.tar.gz
repopvs: hdisk5
- name: Restore only the shared storage pool database from a backup file
viosbr:
action: recoverdb
clustername: mycluster
file: systemA.mycluster.tar.gz
- name: Migrate an older cluster backup file
viosbr:
action: migrate
file: systemA.mycluster.tar.gz
- name: Restore legacy device mappings on a node, which is in cluster using a cluster backup file
viosbr:
action: restore
clustername: mycluster
file: systemA.mycluster.tar.gz
subfile: myclusterMTM8233-E8B02HV32001P3.xml
skipcluster: yes
- name: Restore cluster from a backup file but use the database that exists on the system
viosbr:
action: restore
clustername: mycluster
file: systemA.mycluster.tar.gz
repopvs: hdisk5
currentdb: yes
- name: Recover the cluster on another geographic location
viosbr:
action: dr
clustername: mycluster
file: systemA.mycluster.tar.gz
Return Values¶
- msg (always, str, )
The execution message.
- stdout (always, str, Backup of this node (vios01) successful)
The standard output
- stderr (always, str, File /home/padmin/cfgbackups/myserverbackup.002.tar.gz does not exist.)
The standard error
- ioslevel (always, str, 3.1.0.00)
The latest installed maintenance level of the system
- file (if I(action=backup), str, /home/padmin/cfgbackups/myserverbackup.002.tar.gz)
The name of the backup file that has been created