savevg Command
Purpose
Finds and backs up all files belonging to a specified volume group.
Syntax
savevg [ -a ] [ -A ] [ -b Blocks ] [ -e ] [ -f Device ] [ -i | -m ] [ -p ] [ -r ] [ -T ] [ -v ] [ -V ] [-x file] [ -X ] VGName [-Z]
Description
The savevg command finds and backs up all files belonging to a specified volume group. The volume group must be varied-on, and the file systems must be mounted. The savevg command uses the data file created by the mkvgdata command. This data file can be one of the following:
- /image.data
- Contains information about the root volume group (rootvg). The savevg command uses this file to create a backup image that can be used by Network Installation Management (NIM) to reinstall the volume group to the current system or to a new system.
- /tmp/vgdata/vgname/vgname.data
- Contains information about a user volume group. The VGName variable reflects the name of the volume group. The savevg command uses this file to create a backup image that can be used by the restvg command to remake the user volume group.
To create a backup of the operating system to CD, use the mkcd command.
Flags
Item | Description |
---|---|
-a | Does not back up extended attributes or NFS4 ACLs. |
-A | Backs up DMAPI file system files. |
-b Blocks | Specifies the number of 512-byte blocks to write in a single output operation. If this parameter is not specified, the backup command uses a default value appropriate for the physical device selected. Larger values result in larger physical transfers to tape devices. The value specified must be a multiple of the physical block size of the device being used. |
-e | Excludes files specified in the /etc/exclude.vgname file
from being backed up by this command. Note: If you want to exclude certain files from the backup, create the /etc/exclude.rootvg file, with an ASCII editor, and enter the patterns of file names that you do not want included in your system backup image. The patterns in this file are input to the pattern matching conventions of the grep command to determine which files will be excluded from the backup. If you want to exclude files listed in the /etc/exclude.rootvg file, select the Exclude Files field and press the Tab key once to change the default value to yes. |
-f Device | Specifies the device or file name on which the image is to be stored. The default is the /dev/rmt0 device. |
-i | Creates the data file by calling the mkvgdata command. |
-m | Creates the data file with map files by calling the mkvgdata command with the -m flag. |
-p | Disables software packing of the files as they are backed up. Some tape drives use their own packing or compression algorithms. |
-r | Backs up user volume group information and administration data files. This backs up files such as /tmp/vgdata/vgname/vgname.data and map files if any exist. This does not back up user data files. This backup can be used to create a user volume group without restoring user data files. This cannot be done to rootvg. |
-T | Create a backup using snapshots. This flag applies
only for JFS2 file systems. When you specify the -T flag to use snapshots for creating a volume group backup, external JFS2 snapshots are created. Snapshots allow for a point-in-time image of a JFS2 file system and thus, do not require a system to be put into a temporarily inactive state. The size of the snapshot is 2 - 15% of the size of the file system. The snapshot logical volumes are removed when backup is finished. However, snapshots are not removed if a file system already has other snapshots. Additionally, if a file system has internal snapshots, then external snapshots cannot be created and snapshots are not used for creating the backup of the file system. The use of the -T flag does not affect any JFS file systems that are present in the volume group that is being backed up, These file systems are backed up in the same manner as done previously. |
-v | Verbose mode. Lists files as they are backed up. |
-V | Verifies a tape backup. This flag causes savevg to verify the file header of each file on the backup tape and report any read errors as they occur. |
-x file | Exclude the file systems listed in the file from the volume group backup. One file system mount point is listed per line. |
-X | Specifies to automatically expand the /tmp file system if necessary. The /tmp file system may need to be extended to make room for the boot image when creating a bootable backup to tape. |
-Z | Specifies that the Encrypted File System (EFS) information for all the files, directories, and file systems is not backed up. The flag runs the backup command without the -Z flag. |
Parameters
Item | Description |
---|---|
VGName | Specifies the name of the volume group to be backed up. |
SMIT Fast Paths
- To list the contents of a root volume group backup that is created
with the savevg command, enter the following SMIT fast path:
smit lsmksysb
- To list the contents of a user volume group backup that is created
with the savevg command, enter the following SMIT fast path:
smit lsbackvg
- To restore individual files from a root volume group backup, enter
the following SMIT fast path:
smit restmksysb
- To restore individual files from a user volume group backup, enter
the following SMIT fast path:
smit restsavevg
Examples
- To back up the root
volume group (operating system image) to the /mysys/myvg/myroot backup
file and create an /image.data file, enter:
savevg -i -f/mysys/myvg/myroot rootvg
- To back up the uservg volume
group to the default tape drive (dev/rmt0) and create a new uservg.data file,
enter:
savevg -i uservg
- To back up the data2 volume
group and create map files along with a new data2.data file
on rmt1 device, enter:
savevg -mf/dev/rmt1 data2
- To back up the data2 volume
group, excluding the files listed in the /etc/exclude.data2 file,
enter:
savevg -ief/dev/rmt1 data2
- To back up the volume group my_vg to the tape in /dev/rmt0 and
then verify the readability of file headers, enter:
savevg -f /dev/rmt0 -V my_vg
- To back up the uservg volume group to the UDFS capable
device/dev/usbms0, enter the following command:
savevg –i –f /dev/usbms0
Files
Item | Description |
---|---|
/image.data | Used when the volume group is rootvg. |
/tmp/vgdata/vgname /vgname.data | Used when the volume group is not rootvg and where vgname is the name of the volume group. |