• No se han encontrado resultados

Mediciones Higiénicas

In document UNIVERSIDAD NACIONAL DE INGENIERÍA (página 67-0)

Capitulo 2: Identificación de los factores de riesgo

2.3 Mediciones Higiénicas

There are two different ways to back up large amounts of data: The complete system backup and the incremental backup. We will concentrate on the complete system backup in this chapter because that is what you are going to need before starting your migration from AIX Version 4.3 to AIX 5L. However, an incremental backup is useful for storing data that changes often on the system. It allows the administrator to make sets of incremental backups each night of the week, for example, and to do a full backup only once every weekend.

There are, in addition, different ways of backing up your user or application data and creating an mksysb image of your machine. These will be explained in detail in the next sections. However, before making a decision on your backup strategy, you need to understand file system structure, data placement and how each of these methods work.

A file system is a section of your hard disk that has been allocated to contain files. It is accessed by mounting the file system over a directory. To the user, the mounted file system looks just like any other directory. There are structural differences between the file systems and directories, though, and the data within these can be managed separately. The first time you install the AIX operating system on your machine, it is loaded into a directory structure in the /(root) file system tree.

Additionally, there are two different types of data. The system data makes up the operating system and its extensions and is kept in the system file systems, such as /(root), /usr, /tmp, or /var. Furthermore, there is user data that is kept in the /home file system or any other user-specific file systems. You ought to manage your user and system data separately for backup and restore reasons. This means you back up your system data in a different image to your user data. In addition, system data does not change as often as user data. A separate structure ensures that this backup image will be smaller. Similar reasons apply for restoring user and system data. Restoring only user data saves time and effort because a reboot, as with restoring system data, is not necessary.

Your backup strategy before doing the migration should therefore be to unmount all user file systems, including /home, with the umount command. For this task, the file systems must not be in use. The only mounted file systems should be /(root), /var, /usr, and /tmp. Then back up your operating system data using the

mksysb command. After that is finished, mount the user file system, back up files, file systems, or other non-root volume groups.

There are different commands to be used for saving your user and system data. Regardless of whether you use the Web-based System Manager, SMIT, or the command line, AIX uses four commands to create backups. These are mksysb,

Chapter 4. Planning and preparation 67

group. The savevg command is used for user volume group backups and the

restvg is used to restore the user volume group. All of these will be explained in more detail further below in 4.6.2, “Backup of root volume group” on page 69 and in 4.6.3, “Backup of a non-root volume group” on page 72.

The mkcd command backs up a volume group (either the root volume group or a non-root volume group) to writable CD or DVD media. It transfers a previously made image to the media or calls the mksysb or savevg command to create the image that will be placed onto the media. An example of the command usage is shown in Example 4-15.

Example 4-15 Use of mkcd command # mkcd -d /dev/cd0

# mkcd -d /dev/cd0 -m /mksysb_image/mksysb5

With this command, we back up the operating system of the AIX machine. The first line of Example 4-15 creates a bootable CD on a CD-ROM named /dev/cd0. The second line of the same example uses a previously created mksysb image which we call mksysb5. The -d flag is required and indicates the CD-ROM device.

Furthermore, for backing up your root volume group, you need to decide between a backup with which you can reinstall the same system and a backup with which you can reinstall another system. With AIX 5L Version 5.2, this separation is no longer needed, because at installation or migration time, all device drivers will be installed by default, even if a device is not attached to the machine. This makes it easier to clone a system using the mksysb or mkcd

command. Table 4-3 on page 68 gives an overview of these backup options. You can use Web-based System Manager, SMIT, or command line.

Table 4-3 Making a backup of an AIX Version 4.3 system

Additional information

There are some issues you need to be aware of when planning your backup strategy. When you have database applications that write directly to the device, you often use raw devices. These do not contain a JFS or JFS2 file system. The image created by the mksysb or savevg commands does not include data on raw devices or in paging space. Additionally, when you have special features

installed or when your system uses device drivers that are not shipped with the operating system, these device configurations are not backed up using the two AIX backup commands.

Furthermore, you have the possibility to exclude certain files from the backup. For this task, you can use the /etc/exclude.rootvg file where you list the appropriate files.

The mksysb command requires working space for the duration of the backup. Hence, for a backup of an AIX Version 4.3 system, you need to have enough space in the /tmp file system. Including the -X flag when starting the mksysb

command, as we show in Example 4-17 on page 71, ensures that the system increases the size of /tmp automatically during the backup if needed. Before you start the backup, we recommend checking the integrity of the file system with the

fsck command.

Task Web-based System Manager

SMIT Command Line

Create a backup of rootvg 򐂰 Type wsm on the command line. 򐂰 Choose the Backups container, then Backup of System. 򐂰 For backup on tape, run smitty mksysb.

򐂰 For backup on CD/DVD, run smitty mkcd (to install the same system) or smitty mkcdgeneric (to install on another system).

򐂰 Run the mksysb command, as described in Example 4-17 on page 71. 򐂰 Run the mkcd command, as described in Example 4-15 on page 67. Create a backup of non-rootvg (datavg) 򐂰 Type wsm on the command line. 򐂰 Choose the Volumes container, then datavg and Back up.

򐂰 For backup on tape or file, run smitty savevg. 򐂰 For backup on CD/DVD, run smitty savevgcd.

򐂰 Run the savevg command, as described in Example 4-19 on page 73.

Chapter 4. Planning and preparation 69

In document UNIVERSIDAD NACIONAL DE INGENIERÍA (página 67-0)