mkcd Command
Purpose
Creates multi-volume CDs from a mksysb, savevg, or savewpar backup image.
Syntax
mkcd -r directory | -d cd_device | -S [ -m mksysb_image | -M mksysb_target | -s savevg_image | -v savevg_volume_group | -w savewpar_image | -W wparname ] [ -C cd_fs_dir ] [ -I cd_image_dir ] [ -V cdfs_volume_group ] [ -B ] [ -p pkg_source_dir ] [ -R | -S ] [ -i image.data ] [ -u bosinst.data ] [ -f wparspecificationfile ] [ -e ] [ -P ] [ -l package_list ] [ -L ][ -b bundle_file ] [ -z custom_file ] [ -D ] [ -U ] [ -Y ] [ -n ] [ -a ] [ -A ] [ -c ] [-Z] [-G |-N ] [ -x file ] [ -T ]
Description
For DVD media, system backups that are made with the mkcd command have a limitation in that they expect the media to be 4.7 GB or larger per side. The mkcd command does not process the next volume until it writes over 4 GB on the current volume, thus the use of smaller media would result in corruption when you go beyond the capacity of the media.
When a bootable backup of a root volume group is created, the boot image reflects the currently running kernel. If the current kernel is the 64-bit kernel, the backup boot image is also 64 bit, and it boots 64-bit systems only. If the current kernel is a 32-bit kernel, the backup boot image is 32 bit, and it can boot both 32-bit and 64-bit systems.
With the mkcd command, you can create bootable and non-bootable CDs in Rock Ridge (ISO9660) or UDF (Universal Disk Format) format.
Some sample shell scripts are included for different vendor-specific routines. You can find these scripts in /usr/samples/oem_cdwriters.
- While the mkcd command is running, ensure that system activity is minimal.
- If the mkcd command creates file systems in the backup volume group, they are excluded from the backup.
If you want to create multi-volume CDs because the volume group image does not fit on one CD, the mkcd command gives instructions for CD replacement and removal until all the volumes have been created.
Flags
Item | Description |
---|---|
-a | Does not back up extended attributes or NFS4 ACLs. |
-A | Backs up DMAPI file system files. |
-b bundle_file | Gives the full path name of the file that contains a list of filesets to be installed after the mksysb is restored. This file is copied to ./usr/sys/inst.data/user_bundles/bundle_file in the CD file system and also copied to RAM in case the CD is unmounted. The file would be listed as BUNDLES=/../usr/sys/inst.data/user_bundles/bundle_file in the bosinst.data file. |
-B | Prevents the mkcd command from adding boot images (non-bootable CD) to the CD. Use this flag if you want to create a mksysb CD that you will not boot. Before you install the non-bootable mksysb CD, you must boot a same level (V.R.M.) product CD. The mkcd command defaults to creating a bootable CD for the machine type of the source system. See Notes for details. |
-c | Does not compress or pack files as they are backed up. |
-C cd_fs_dir | Specifies the file system that is used to create the CD file
system structure, which must have at least 645 MB of available disk
space (up to 4.38 GB for DVD sized images). The CD image consumes
only as much room as is necessary to contain all the data on the CD.
If you do not specify the -C flag and the /mkcd/cd_fs directory exists, the mkcd command uses that directory. If you do not specify the -C flag and the /mkcd/cd_fs directory does not exist, the mkcd command creates the file system /mkcd/cd_fs and removes it when the command finishes running. The command creates the file system in the volume group that is indicated with the -V flag, or rootvg if that flag is not used. Each time that you invoke the mkcd command, a unique subdirectory (that uses the process id) is created under the /mkcd/cd_fs directory, or in the directory that is specified with the -C flag. Note: If performing
DVD sized backups, the file systems must be large file enabled.
This type of backup also requires setting the file ulimit size
to unlimited.
|
-d cd_device | Indicates the CD-R, DVD-R, or DVD-RAM device (/dev/cd1, for instance). This flag is required unless you use the -S flag. |
-D | Turns on the debug output information feature. The default is no debug output. |
-e | Excludes the files and directories from the backup image that is listed in the /etc/exclude.volume_group file. You cannot use this flag with the -m or -s flags. |
-f wparspecificationfile | Specifies the user-supplied WPAR specification file. This specification file of workload partition takes precedence over the wpar.spec file in the savewpar image. If you do not use the -f flag, the mkcd command restores the wpar.spec file from the specified savewpar image, or generates a new wpar.spec file during the creation of savewpar. |
-i image.data | Specifies the user-supplied image.data file. This data
file takes precedence over the image.data file in the mksysb image.
If you do not give the -i flag, then mkcd restores the image.data from
the specified mksysb image, or generates a new image.data file
during the creation of mksysb. Note: The -i flag cannot
be used to specify a user-supplied vgname.data file for use
with a savevg image.
|
-I cd_image_dir | Specifies the directory or file system where the final CD images
are stored before they are written to the CD-R, DVD-R, or DVD-RAM
device. If this flag is not used, mkcd uses the /mkcd/cd_images directory
if it already exists. If not, the command creates the /mkcd/cd_images file
system in the volume group that is given with the -V flag,
or in rootvg if that flag is not used. If the mkcd command
creates the file system, it is removed upon command completion, unless
either the -R or -S flag is used. If the -R or -S flag
is used, consideration must be made for adequate file system, directory,
or disk space, especially when you create multi-volume CDs. The CD
image consumes only as much room as is necessary to contain all the
data on the CD.
Note: If performing DVD sized backups, the file systems
must be large file enabled. This type of backup also requires
setting the file ulimit size to unlimited.
|
-l package_list | Specifies the file that contains a list of additional packages you want copied to the ./usr/lpp/inst.images directory of the CD file system. The images are copied from the location that is named with the -p flag. If you use the -l flag, you must also use the -p flag. |
-L | Creates final CD images that are DVD sized (up to 4.38 GB). |
-m mksysb_image | Specifies a previously created mksysb image. If you do not specify the -m flag, the mkcd command calls mksysb. For more information about where the mksysb image is placed, see the -M flag. |
-M mksysb_target | States the directory or file system where the mksysb or savevg image
is stored if a previously created backup is not given with the -m or -s flags.
If the -M flag is not used and a mksysb or savevg
image is not provided, the mkcd command verifies that /mkcd/mksysb_image exists.
If the directory does not exist, then the mkcd command creates
a separate file system, /mkcd/mksysb_image, where the mksysb or savevg images
are temporarily stored. The command creates the file system in the
volume group that is given with the -V flag, or in rootvg if
that flag is not used. Note: If performing DVD sized backups, the
file systems must be large file enabled. This also requires
setting the file ulimit size to unlimited.
|
-n | 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 flag does not back up user data files. This backup can be used to create a user volume group without restoring user data files. This action cannot be done to rootvg. |
-N | Includes file systems that belong to a workload partition (WPAR) in the defined state
in the system backup. Note: To be included in the backup, all file
systems that belong to a WPAR in
the defined state must be in the rootvg volume group.
|
-p pkg_source_dir | Names the directory or device that contains device and kernel package images. The device must be a CD device (for example, /dev/cd0). If you use the same CD-R, DVD-R, or DVD-RAM device that you gave with the -d flag, the product CD media must be inserted into the CD-R drive first. The mkcd command then prompts you to insert the writeable CD before the actual CD creation. |
-P | Creates physical partition mapping during the mksysb or savevg creation. You cannot use this flag with the -m or -s flags. |
-r directory | Indicates existing directory structure to burn onto a CD or DVD. This flag makes a CD image that is a copy of the specified directory structure. |
-R | Prevents the mkcd command from removing the final CD images. mkcd defaults by removing everything that it creates when it finishes running. The -R flag allows multiple CD image sets to be stored, or for CD creation (burn) to occur on another system. If multiple volumes are needed, the final images are uniquely named by using the process ID and volume suffixes. |
-s savevg_image | Indicates a previously created savevg image. All savevg backup images are nonbootable. See Notes for details. |
-S | Stops the mkcd command before it writes to the CD-R, DVD-R, or DVD-RAM without removing the final CD images. The -S flag allows multiple CD sets to be created, or for CDs to be created on another system. The images remain in the directory marked by the -I flag, or in the /mkcd/cd_images directory if the -I flag is not used. If multiple volumes are required, the final images are uniquely named by using the process ID and volume suffixes. |
-T | Creates backup by using snapshots. This command applies only
to 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 back up is complete. However, snapshots are not removed if a file system already has other snapshots. Additionally, if a file system has internal snapshots, external snapshots cannot be created and thus, 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. |
-u bosinst.data | Specifies the user-supplied bosinst.data file. This data file takes precedence over the bosinst.data file in the mksysb image. If you do not give the -u flag, then the mkcd command restores bosinst.data from the specified mksysb image, or generates a new bosinst.data file during the creation of mksysb. |
-U | Creates a UDF (Universal Disk Format) file system on DVD-RAM media. It does not require the amount of free space that is needed to create Rock Ridge format backups. It does not need the /mkcd/cd_fs and /mkcd/cd_images file systems. Therefore, the only temporary disk space it needs is to create the backup image that will be copied to the media. This means that the -I and -C flags do not apply to the -U flag. Because the backup is copied to the media, images cannot be created and burned later or on another system. So, the -R flag and -S flag do not apply when you use the -U flag. You must specify a device to write to with the -d flag. The -U flag does not use the /usr/sbin/mkrr_fs or /usr/sbin/burn_cd file systems. |
-v savevg_volume_group | Denotes the volume group to be backed up using the savevg command. All savevg backup images are nonbootable. See Notes for details. For more information about where the savevg image is placed, see the -M flag. |
-V cdfs_volume_group | Indicates the volume group that is used when you create the file systems needed for the mkcd command. If the -V flag is not given and a file system is needed but not there (because it was not supplied with other flags), then rootvg is the default volume group for creating the file systems. If the mkcd command creates the file systems in the backup volume group, those file systems are not included as part of the backup image. mkcd-created file systems are removed upon completion of the command. |
-w savewpar_image | Indicates a previously created savewpar image. |
-W wparname | Denotes the workload partition to be backed up using the savewpar command. |
-Y | Accepts licenses. |
-z custom_file | States the full path name of the file to be copied to the root
directory of the CD file system. This file could be a customization
script that is specified in the bosinst.data file, such as CUSTOMIZATION_FILE=filename.
For example: If the file my_script is in /tmp on the machine where the mkcd command is running, then enter -z/tmp/my_script and specify CUSTOMIZATION_FILE=my_script. The code copies the script to the root directory of the RAM file system before it runs. |
-Z | Specifies that the Encrypted file system (EFS) information for all the files, directories, and file systems is not backed up. |
-G | Excludes WPAR file systems from the system backup. The flag is not valid with -N flag. |
-x file | Excludes the file systems that are listed in the file from the system backup. File system mount points must be listed one per line. |
- If you are creating a non-bootable CD (by using the -B flag), you cannot use the -p or -l flags.
- If you are creating a non-bootable CD with a savevg image (by using the -s or -v flags), you cannot use the -p, -l, -u, -i, -z, or -b flags.
Examples
- To generate a bootable system backup to the CD-R
device named /dev/cd1, enter the following command:
mkcd -d /dev/cd1
- To generate a system backup to the DVD-R or DVD-RAM device named /dev/cd1,
enter the following command:
mkcd -d /dev/cd1 -L
- To generate a non-bootable volume group backup
of the volume group myvg to /dev/cd1, enter the
following command:
mkcd -d /dev/cd1 -v myv
Note: All savevg backup images are non-bootable. - To generate a non-bootable backup of the workload partition mywpar to /dev/cd1,
enter the following command:
mkcd -d /dev/cd1 -W mywpar
Note: All savewpar backup images are not bootable. - To generate a non-bootable backup of the workload partition mywpar to /dev/cd1 from
the previously generated savewpar image /wparbackups/mywpar.bff,
enter the following command:
mkcd -d /dev/cd1 -w /wparbackups/mywpar.bff
- To create a CD or DVD that duplicates an existing directory structure
such as:
/mycd/a /mycd/b/d /mycd/c/f/g
enter the following command:mkcd -r /mycd -d /dev/cd1
After you mount with mount -o ro /dev/cd1 /mnt, cd to /mnt; a find . -print command displays:./a ./b ./b/d ./c ./c/f ./c/f/g
Files
Item | Description |
---|---|
/usr/bin/mkcd | Contains the mkcd command. |