IBM Support

IBM AIX HowTo: Instructions to backup and restore a user-defined (non-rootvg) volume group (VG)

How To


Summary

This document provides step by step instructions on how to backup, list, and restore a user volume group (non-rootvg).

Objective

An AIX system has a system volume group (rootvg) (intended for system data and programs) and user-defined volume groups (non-root volume groups) (intended to store application software and data).  This document provides step by steps instructions to backup, list, and restore a user defined volume group using the savevg and restvg commands. 

Environment

The test environment used for the document consists of a non-root volume group datavg and a backup file saved in the directory /backups/savevg.  Although this file was used as the backup device, the same steps apply when using a CD, DVD, removable hard disk cartridge, or tape.

Steps

The savevg command is used to create a user-volume group backup to a CD, DVD, removable hard disk cartridge, tape, or file. It finds and backs up all files belonging to a specified volume group. Then the backup image that is created is used with the restvg command to create the volume group, logical volumes, and file system information contained in the file. 

Note: The volume group must be varied-on, and the file systems must be mounted. 

Step 1. Backup the datavg.
  • Start by checking that the volume group is active and mounted  
# lspv 
hdisk1          00fb43b9a4167723            datavg   active  

# df -g 
/dev/fslv00        1.00      1.00    1%      4     1% /mount 
  •  Create a savevg backup to a file. 
# savevg -if /backups/savevg datavg 
Creating information file for volume group datavg. 
Creating list of files to back up  
0512-038 savevg: Backup Completed Successfully. 

Step 2. Validate the backup.

  • Check the backup: 
# restore -Tqvf /backups/savevg 
 New volume on /backups/savevg: 
 Cluster 51200 bytes (100 blocks). 
    Volume number 1 
    Date of backup: Mon Nov  6 04:15:09 2023 
    Files backed up by name 
    User root 
  • Or list the contents of the system backup  
# listvgbackup -l -f /backups/savevg 

Step 3. Restore the backup.

  • Restore the volume group from a file backup to a different disk: 
# restvg -if /backups/savevg <hdisk#> 
  • Or restore on the same disk it was taken from: 
# restvg -f /backups/savevg 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvoiAAA","label":"Install"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
27 March 2024

UID

ibm17111765