Saving and restoring snapshots
Use the ksysmgr command to save the configuration snapshots. The
snapshots are saved in an XML format. When you create a snapshot, the ksysmgr
command appends the date and time to the specified file name to follow the
filename.DateTime name convention. By
default, the snapshot files are saved in the /var/ksys/snapshots directory.
However, you can specify the path where the snapshot files must be saved.
Notes:
- You must ensure that the /var file system has enough space for the snapshot files before you back up the configuration data.
- If the KSYS node must be reinstalled, you must save the snapshot files in a different location so that the snapshot files can be used later for restoring the configuration settings by using the ksysmgr command. You can use the ftp command to copy the snapshot files to another system and to copy the snapshot files from another system to the KSYS node after the installation is complete.
- You cannot restore a snapshot file that is captured in a different site. To restore a snapshot file, the snapshot file must be captured on the same site.
- If you want to know the tertiary disk information after restoring a detailed snapshot, you must run the discovery operation with the dr_test flag.
- If you connect the source hosts and target hosts to the same HMC, it leads to an invalid configuration in the KSYS subsystem. If you had saved a snapshot of such an invalid configuration, the restore operation fails.
You can perform the following snapshot operations:
- To
save a snapshot, use the following command
syntax:
For example, to back up configuration data of your KSYS environment once in a week such that no more than 5 backup files exist, run the following command:ksysmgr add snapshot filepath=full_file_prefix_path|file_prefix
The ksysmgr command saves the snapshot after archiving and compressing the file.ksysmgr add snapshot filepath=/home/ksysdir/myksysbackup - To view an existing snapshot, use the following command
syntax:
For example:ksysmgr query snapshot filepath=full_file_prefix_path
An output that is similar to the following example is displayed:ksysmgr query snapshot filepath=/var/ksys/snapshots/ksystestdetailsnap_DETAILED_2019-12-12_04:07:52.xml.tar.gzFile: /var/ksys/snapshots/ksys6002detailsnap_DETAILED_2019-12-12_04:07:52.xml Type: DETAILED VMRM Version: 1.5.0.0 Date: 2019-12-12 Time: 04:07:52 --------------------------- Cluster: -------- Name: DR_TEST Node: <hostname> Type: DRBefore you restore a saved snapshot on a KSYS node, in which the operating system is reinstalled, or on another logical partition that must be used as KSYS LPAR, you must ensure that the HOST variable is set. You can set the HOST variable as shown in the following example:# export HOST=host_name - To restore the configuration data on a KSYS node, use the following command
syntax:
For example:ksysmgr restore snapshot filepath=full_file_prefix_path
This command decompresses and unarchives the snapshot file, and then applies the configuration settings to the KSYS node.ksysmgr restore snapshot filepath=/home/ksysdir/myksysbackup_2016_06_23_04:54:30.xml.tar.gz