This is an archive version of the document. To get the most up-to-date information, see the current version.

Restoring Machine with Command-Line Interface

In this article

    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:

    1. Boot the machine on which you want to restore data from the recovery image and start the Veeam Recovery Environment.
    2. Specify backup location settings.
    3. Restore the machine configuration.
    4. Map restored drives.
    5. 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:

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

    1. 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>]
    Class = 4
    Remote = 0
    Path = </path/to/backup>
    SizeInMB = 0

    where:

    For example:

    cat > /etc/veeam/devices.ini << EOF
    [full_backup]
    Class = 4
    Remote = 0
    Path = /mnt/backups/full/machine01.vtd
    SizeInMB = 0
    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.

    1. In the /etc/veeam/ubax.ini configuration file, specify the default backup location. To do this, enter a record of the following format:

    [UBax]
    DefStorageDev="<location>"
    LocalFS="1"

     

    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
    [UBax]
    DefStorageDev="full_backup"
    LocalFS="1"
    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:

    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:
    1. Mount the NFS directory to the recovery environment file system. For example:

    mount 192.168.1.2:/veeam /mnt/veeam

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

    Step 4. Map Restored Drives

    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:

    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>
    <node from="<disk node in source configuration>">disk node in target configuration</node>
    </map>

    For example:

    <map>
    <node from="<hdisk0>">hdisk0</node>
    </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

    Restoring Machine with Command-Line Interface Important!

    As soon as the recovery process starts, all data residing on the disks to which you restore data will be overwritten.

     

    Restoring Machine with Command-Line Interface Tip:

    Consider the following:

    • The list of recovery phases required to restore your machine data and make the restored system bootable depends on the configuration of the backed-up system. To view a list of phases that will be performed during recovery, on the machine booted from the recovery image, use the following command: disrec --phases. Veeam Agent for IBM AIX will retrieve information from the disrec.xml configuration file and display the list of phases to perform during recovery.
    • Prior to starting the recovery process, you can check whether it is possible to restore the backed-up machine on the current machine. To do this, use the following command: disrec --validate. Veeam Agent for IBM AIX will read the disrec.xml and current.xml configuration files and check whether the resulting configuration can be applied to the machine on which you restore data. In case the check completes successfully, Veeam Agent for IBM AIX will display information about the recovery phase from which the recovery process will start.

    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 a full backup: latest.
    • For an incremental backup: <backup version number> or latest.

    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:

    • Level 0 (ERROR): Only errors are logged.
    • Level 1 (WARNING): Errors and warnings are logged.
    • Level 2 (INFO): Errors, warnings and information are logged.
    • Level 3 (DEBUG): Debugging information is logged.
    • Level 4 (TRACE): All information is logged.

    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.