Skip Headers
Oracle® Exalogic Elastic Cloud Backup and Recovery Guide Using ExaBR
Release 1.1

E36329-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

5 Backup and Recovery of User vServers

This chapter provides the steps for backing up and recovering user vServers. It contains the following sections:

5.1 Backing Up User vServers

You can back up user vServers using ExaBR as follows:

5.1.1 Backing Up User vServers Created Using EECS 2.0.6 Guest Base Template

User vServers created using EECS 2.0.6 Guest Base Template support Logical Volume Manager (LVM)-based partitioning. ExaBR can back up these vServers using LVM-based snapshots. These LVM snapshots are stored in the backup location you specify using the -r option or EXABR_REPO environment variable.

ExaBR backs up a user vServer using LVM-based snapshots, by doing the following tasks:

  1. Creates an LVM-based snapshot of the vServer file system.

  2. Mounts the snapshot.

  3. Creates an archive of the mounted filesystem from the snapshot.

  4. Unmounts and deletes the snapshot.

By default, ExaBR excludes the following directories when backing up user vServers:

  • /tmp

  • /var/tmp

  • /var/run

  • /var/lib/nfs

ExaBR backs up only files from the root (/) and /boot directories. It does not back up the NFS mounts or mounted volumes on a vServer, if any.

You can use the --exclude-paths option to define your own exclusion list. You can use the --include-paths option to back up only the specified directories. The --include-paths option is useful for backing up customizations. These options are described in Section 2.4.2, "ExaBR Options."

Prerequisites:

The following are the prerequisites for using LVM-based snapshots to back up vServers with ExaBR:

  • The size of the swap space logical volume should be at least 512 MB for the creation of the LVM-based snapshot.

    Note:

    You can ensure that ExaBR does not use the swap space of the vServer, by running the steps in Appendix C, "Increasing the Size of the Logical Volume Group of a vServer."

  • The share you back up to must have enough free space for the extraction of the LVM-based snapshot.

  • The vServer must be accessible from the compute node from which ExaBR is running.

You can use ExaBR to take LVM-based snapshots as backups for these vServers, by doing the following:

  1. Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."

  2. Add the addresses of the vServers you want to back up to the exabr.config file under the user-vm parameter. You can use the virt-admin address or, if applicable, the public IP address of the vServer.

  3. Use ExaBR to back up user vServers, in one of the following ways:

    • To back up specific user vServers, run ExaBR as follows:

      ./exabr backup address_of_vServer [options]
      
    • To back up all user vServers listed in the exabr.config file, run ExaBR as follows:

      ./exabr backup all-itemized-vms [options]
      

    For a complete list of options, see Section 2.4.2, "ExaBR Options."

    Note:

    If a vServer you are backing up hosts a critical application, ensure that you back up the vServer when either the application has stopped or the vServer is shut down.

    Example:

    ./exabr backup all-itemized-vms --exclude-paths /var/tmp,/var/lib/nfs,
    /tmp,/dev,/custom 
    

    In this example, ExaBR backs up all user vServers listed in the exabr.config to the backup location you specified. It also excludes the /var/tmp, /var/lib/nfs, /tmp, /dev, and /custom directories as the --exclude-paths option is used.

    The --exclude-paths option overrides the default exclusion list.

    To restore backups made using this procedure, see Section 5.2.1, "Restoring User vServers Created Using EECS 2.0.6 Guest Base Template."

5.1.2 Backing Up User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier

All the artifacts for the user vServers are stored in the ExalogicRepo share on the ZFS storage appliance. These artifacts can be backed up either by using ExaBR to create ZFS snapshots or by performing a full back up to an external storage device using your existing back up strategy (for example: agent-based back up, NDMP, or ZFS replication). ExaBR backs up users vServers created using EECS 2.0.4 guest base template or earlier by taking a snapshot and storing it on the storage appliance. ExaBR does not store these backups in the backup directories as described in Section 2.1, "Backup Locations."

Note:

To take non-interactive backups of user vServers, enable key-based authentication for the first compute node and storage heads using the init-ssh command. The usage of the init-ssh command is described in Section 2.3.1, "Enabling Key-Based Authentication for ExaBR."

Note:

When you back up the Exalogic Control stack using ExaBR, it also backs up user vServers. If you have backed up the control stack, you do not need to run the following steps.

You can back up user vServers using ExaBR, by doing the following:

  1. Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."

  2. You can back up user vServers by running ExaBR as follows:

    ./exabr backup user-vm [options]
    

    For a complete list of options, see Section 2.4.2, "ExaBR Options."

    ExaBR backs up all user vServers by taking a snapshot. This operation backs up the local virtual disks of a vServer. It does not back up the NFS mounts of a vServer or mounted volumes on a vServer, if any.

    Note:

    If a vServer you are backing up hosts a critical application, ensure that you back up the vServer when the vServer is shut down.

    Example:

    ./exabr backup user-vm
    

    In this example, ExaBR backs up all user vServers by taking a snapshot of the ExalogicRepo share.

To restore backups made using this procedure, see Section 5.2.2, "Restoring User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier."

For more information, see the Exalogic Backup and Recovery Best Practices White Paper at http://www.oracle.com/technetwork/database/features/availability/maa-exalogic-br-1529241.pdf.

5.2 Restoring User vServers

You can restore user vServers using ExaBR as follows:

5.2.1 Restoring User vServers Created Using EECS 2.0.6 Guest Base Template

Restore user vServers that you backed up in Section 5.1.1, "Backing Up User vServers Created Using EECS 2.0.6 Guest Base Template", by doing the following:

Note:

You can restore a vServer only if the vServer exists in Exalogic Control. If you deleted the vServer in Exalogic Control, you cannot restore the vServer.

  1. Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."

  2. Ensure that the addresses of the vServers you want to restore exist in the exabr.config file in the user-vm parameter.

  3. View a list of backups by running ExaBR as follows:

    ./exabr list all-itemized-vm
    

    Example:

    ./exabr list all-itemized-vm
    

    In this example, ExaBR lists the backups made for user vServers. Note the name of the backup you want to use to restore your user vServer.

  4. You can restore user vServers by running ExaBR as follows:

    ./exabr restore address_of_vServer [options]
    

    For a complete list of options, see Section 2.4.2, "ExaBR Options."

    Example:

    ./exabr restore 192.168.1.2 -b 201309121315 --include-paths /home/Oracle
    

    In this example, ExaBR restores the /home/Oracle directory of the user vServer with the address 192.168.1.2 from the backup called 201309121315.

5.2.2 Restoring User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier

Restore user vServers that you backed up in Section 5.1.2, "Backing Up User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier", by doing the following:

Note:

You can restore a vServer only if the vServer exists in Exalogic Control. If you deleted the vServer in Exalogic Control, you cannot restore the vServer.

  1. Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."

  2. Use Exalogic Control to stop the vServer you want to restore.

  3. View a list of backups by running ExaBR as follows:

    ./exabr list user-vm
    

    Example:

    ./exabr list user-vm
    

    In this example, ExaBR lists the backups made for user vServers. Note the name of the backup you want to use to restore your user vServer.

  4. You can restore user vServers by running ExaBR as follows:

    ./exabr restore user-vm --vm vm_name [options]
    

    For a complete list of options, see Section 2.4.2, "ExaBR Options."

    Example:

    ./exabr restore user-vm --vm test -b exabr_201309121315
    

    In this example, ExaBR restores the user vServer called test from the backup called exabr_201309121315. If more than one vServer exists with the same name, use the vServer GUID instead, as in the following example:

    ./exabr restore user-vm --vm 0004fb0000060000399e5199ecae0041 -b exabr_201309121315
    

    You can identify the vServer GUID using Exalogic Control in the Summary page of the vServer as the Domain Name.

  5. After the restoration is complete, log in to all the restored vServers

  6. Log in to Exalogic Control as the root user.

  7. From the navigation pane on the left, click vDC Management.

  8. Expand your cloud, such as MyCloud.

  9. Expand Accounts.

  10. Expand the account to which the vServer you restored belongs, such as Dept1.

    All the vServers in the account are displayed.

  11. Select the vServer you restored.

    The dashboard of the vServer is displayed.

  12. From the actions pane on the right, click Launch Virtual Console and monitor the vServer startup. If any disk issue is detected, fdisk will start automatically.