[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 5

savevg Command

Purpose

Finds and backs up all files belonging to a specified volume group.

Syntax

savevg-b Blocks ] [ -e ] [ -f Device ] [ -i-m ] [ -p ] [ -v ] [ -X ] VGName

Description

Attention: The savevg command will not generate a bootable tape if the volume group is the root volume group. Although the tape is not bootable, the first three images on the tape are dummy replacements for the images normally found on a bootable tape. The actual system backup is the fourth image. For more information about images on bootable tapes, please see Troubleshooting an Installation from a System Backup, General Information Regarding Mksysb System Backups in the AIX Installation Guide.

The savevg command finds and backs up all files belonging to a specified volume group. A 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 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, please refer to the mkcd command.

Flags

-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.

For example, to exclude all the contents of the directory called scratch, edit the exclude file to read as follows:

	/scratch/

For example, to exclude the contents of the directory called /tmp, and avoid excluding any other directories that have /tmp in the pathname, edit the exclude file to read as follows:

	^./tmp/

All files are backed up relative to . (current working directory). To exclude any file or directory for which it is important to have the search match the string at the beginning of the line, use ^ (caret character) as the first character in the search string, followed by . (dot character), followed by the filename or directory to be excluded.

If the filename or directory being excluded is a substring of another filename or directory, use ^. (caret character followed by dot character) to indicate that the search should begin at the beginning of the line and/or use $ (dollar sign character) to indicate that the search should end at the end of the line.

-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. This flag only applies to AIX Version 4.2 or later.
-v Verbose mode. Lists files as they are backed up. This flag only applies to AIX Version 4.2 or later.
-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. This flag only applies to AIX Version 4.2 or later.

Parameters

VGName Specifies the name of the volume group to be backed up.

Examples

  1. To backup 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
  2. To backup the uservg volume group to the default tape drive (dev/rmt0) and create a new uservg.data file, enter:
    savevg -i uservg
  3. To backup the data2 volume group and create map files along with a new data2.data file on rmt1 device, enter:
    savevg -mf/dev/rmt1 data2
  4. To backup the data2 volume group, excluding the files listed in the /etc/exclude.data2 file, enter:
    savevg -ief/dev/rmt1 data2

Files

/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.

Related Information

The backup command, bosboot command, mkcd command, mkszfile command.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]