This posts explains the steps to followed in taking a Data Volume Group Backup. The data volume group is backed up a backup/restore format file which contains complete information about the volume group backed up.
This operation is performed without bring the VG offline.
Scenario:
Volume Group to be backup'd : office
Destination : /tmp/office-bakup, this logical volume belongs to a different volume group.
# lsvg -o /* Ensure the VG is online */
# savevg -ivf / /tmp/office-backup office
-i : Create a image of the volume group office.
-v : Verify the file backed up.
-f : Destination file name. /tmp/office-backup
# cd /tmp/office-backup /* Verify the backup file created */
# cat <filename> / * View the contents of the VG backed up*/
Restore:
Now we delete the source volume group to restore the volume group from its backup.
# umount <filesystem> /* Unmount all the file systems of the volume group office*/
# reducevg -d -f office hdisk* /* Remove the hdisk from the volume group*.
# lsvg /* Verify the volume group does not exist */
# restvg -f -d /tmp/office-backup /* To restore the Volume Group */
The above command restored the volume group as it was on the same PV, with all the file systems mounted.
This operation is performed without bring the VG offline.
Scenario:
Volume Group to be backup'd : office
Destination : /tmp/office-bakup, this logical volume belongs to a different volume group.
# lsvg -o /* Ensure the VG is online */
# savevg -ivf / /tmp/office-backup office
-i : Create a image of the volume group office.
-v : Verify the file backed up.
-f : Destination file name. /tmp/office-backup
# cd /tmp/office-backup /* Verify the backup file created */
# cat <filename> / * View the contents of the VG backed up*/
Restore:
Now we delete the source volume group to restore the volume group from its backup.
# umount <filesystem> /* Unmount all the file systems of the volume group office*/
# reducevg -d -f office hdisk* /* Remove the hdisk from the volume group*.
# lsvg /* Verify the volume group does not exist */
# restvg -f -d /tmp/office-backup /* To restore the Volume Group */
The above command restored the volume group as it was on the same PV, with all the file systems mounted.