Restoring Machine with Command-Line Interface
For bare-metal restore, Veeam Agent for IBM AIX uses the disrec utility. To perform bare-metal restore with the Veeam Agent for IBM AIX command-line interface, complete the following steps:
- Boot the machine on which you want to restore data from the recovery image and start the Veeam Recovery Environment.
- Specify backup location settings.
- Restore the machine configuration.
- Map restored drives.
- Start the recovery process.
Step 1. Boot from Recovery Image and Start Recovery Environment
Boot the machine on which you want to restore data from the recovery image. Once the Veeam Recovery Environments starts, in the main menu, select Exit to shell. To learn more, see Starting Recovery Environment.
Step 2. Specify Backup Location Settings
To specify backup location settings:
- Mount the NFS volume where the backup from which you want to restore data resides to the Veeam Recovery Environment file system. For example:
mount 192.168.1.2:/veeam /mnt/veeam |
- In the /etc/veeam/devices.ini configuration file, specify settings for the backup location that contains the backup from which you want to restore data. To do this, enter a record of the following format:
[<location_name>] |
where:
- <location_name> — name of the backup location.
- </path/to/backup> — path to a VTD file (in case you want to restore data from a full backup) or path to a directory with backup file(s) (in case you want to restore data from an incremental backup).
For example:
cat > /etc/veeam/devices.ini << EOF |
For the full description of the devices.ini file format, refer to the ubax manual page. To view the page, on the machine where Veeam Agent for IBM AIX is installed, use the man ubax command.
- In the /etc/veeam/ubax.ini configuration file, specify the default backup location. To do this, enter a record of the following format:
[UBax] |
where <location> is the name of the default backup location (that is, the backup location whose settings you specified at step 2).
The following example displays the command used to select the backup location with the name full_backup as the default backup location.
cat > /etc/veeam/ubax.ini << EOF |
For the full description of the ubax.ini file format, refer to the ubax manual page. To view the page, on the machine where Veeam Agent for IBM AIX is installed, use the man ubax command.
Step 3. Restore Machine Configuration
Restore the machine configuration. This process differs depending on the location of the backed-up machine configuration:
- If the file that contains up-to-date information about the restored machine configuration is included in the backup, restore the machine configuration from the backup. The way to restore configuration depends on the type of backup. The following examples display commands to restore a configuration saved to the default /VEEAMCFG/disrec.xml configuration file.
To restore configuration from a full backup, use the ubax utility. For example, to restore configuration from a backup created with the default veeam.scp backup script, use the following command:
ubax --overwrite=1 --snumber=0 --restore /etc/veeam/scripts/veeam.scp |
To restore configuration from an incremental backup, use the following command:
tar -xvf machine.tar.gz ./VEEAMCFG/disrec.xml |
To learn more about file-level restore with the Veeam Agent for IBM AIX command-line interface, see Restoring Files with Command-Line Interface.
- If the file that contains up-to-date information about the restored machine configuration resides in an NFS directory, do the following:
- Mount the NFS directory to the recovery environment file system. For example:
mount 192.168.1.2:/veeam /mnt/veeam |
- Copy the configuration file to its default location — that is, the /VEEAMCFG directory in the recovery environment file system. For example:
cp /mnt/veeam/config/disrec.xml /VEEAMCFG/disrec.xml |
Alternatively, you can specify the configuration file as an option of the command used to perform the recovery process. To learn more, see Start Recovery Process.
If you want to specify drive mapping settings for the restore process, prepare an XML configuration file with drive mapping rules. To do this, use the following command:
disrec --input </path/to/disrec.xml> --intermediate </path/to/merged.xml> --map </path/to/mapping.xml> --createmap |
where:
- --input </path/to/disrec.xml> — option that defines the path to the file with information about the backed-up machine configuration.
- --intermediate </path/to/merged.xml> — option that defines the path to the resulting configuration file generated using the current.xml and disrec.xml files. To learn more, see Configuration Restore.
- --map </path/to/mapping.xml> — option that defines the path to the configuration file that contains drive mapping rules.
- --createmap — option that instructs disrec to create the configuration file that contains drive mapping rules.
For example:
disrec --input /VEEAMCFG/disrec.xml --intermediate /tmp/merged.xml --map /tmp/mapping.xml --createmap |
You can edit the mapping.xml file as required or use this file to create a custom configuration file with drive mapping rules. Drive mapping rules are specified in the following format:
<map> |
For example:
<map> |
To map restored drives during recovery according to the specified rules, you must specify a path to the configuration file that contains the rules with the --map option of the disrec command. To learn more, see Start Recovery Process.
Without the --map option specified, Veeam Agent for IBM AIX will generate the mapping.xml configuration file and attempt to map restored drives automatically during recovery.
Step 5. Start Recovery Process
|
As soon as the recovery process starts, all data residing on the disks to which you restore data will be overwritten. |
|
Consider the following:
|
To start the recovery process, use the following command:
disrec --restore [options] |
The command has the following options:
Option | Required | Description |
--restore | Yes | Instructs disrec to perform restore. |
--startphase <phase> | No | Specifies the recovery phase from which to start the recovery process. If no start phase is specified, the recovery will start from the first phase in the list of phases required for recovery. The list of phases required to perform recovery on the current machine depends on the machine configuration. To view the list of phases, use the disrec --phases command. |
--continue | No | Instructs disrec to automatically detect the phase from which to start the recovery process. This option can be used instead of the --startphase option. The option may be useful in case you want to restart a previously failed recovery. The recovery process will restart from a phase during which the initial recovery failed. |
--endphase <phase> | No | Specifies the recovery phase with which to complete the recovery process. If no end phase is specified, the recovery will end with the last phase in the list of phases required for recovery. The list of phases required to perform recovery on the current machine depends on the machine configuration. To view the list of phases, use the disrec --phases command. |
--backup_version <version|latest> | No | Specifies the backup version. Possible values:
For an incremental backup, the backup version is the number of the incremental backup file that follows the backup file created at the point in time to which you want to restore the data. For example, if you want to restore a machine to the point in time when the third incremental backup file for this machine was created, use the --backup_version 4 option with the disrec command. |
--backup_time <time> | No | Specifies the point in time to which the machine will be restored. Time is specified in the ISO format, for example: "Wed 25 May 09:31:28 2011". |
--map <mapfile.xml> | No | Specifies the configuration file that contains information about drive mapping settings. For information about the file format, see Map Restored Drives. |
--onlyrootvg | No | Defines that only those disks that are required to install the root file system will be recovered. Without this option specified, all volume groups will be recovered from the backup. |
--minimum | No | Defines that logical volumes created during restore will have the minimum size required to fit the restored data. This option is useful if you are recovering backed-up data to a machine with smaller disks. |
--keepgoing | No | Defines that only failures that prevent recovery of volumes and file systems directly associated with the root volume group halt the recovery process. Without this option specified, all failures are considered fatal and immediately halt the recovery process. |
--input | No | Specifies the configuration file. The default value is /VEEAMCFG/disrec.xml. |
--log-level <N> | No | Specifies the logging level. The following values are available:
The default value is 2. |
--log-file <file.log> | No | Specifies the log file name. |
Examples
The following example displays a command to recover a machine. Will prompt to specify the backup version.
disrec --restore |
The following example displays a command to recover a machine using the latest backup version (to recover a machine from a full backup or to recover a machine to the point in time when latest incremental backup file was created).
disrec --restore --backup_version latest |
The following example displays a command to restore a machine to a specific point in time.
disrec --restore --backup_time "Wed 23 May 09:31:28 2018" |
The following example displays a command to run a single recovery phase.
disrec --restore --startphase Mount --endphase Mount |
For more examples, refer to the disrec manual page. To view the page, on the machine where Veeam Agent for IBM AIX is installed, use the man disrec command.