This chapter provides the steps for backing up and recovering user vServers. It contains the following sections:
You can back up user vServers using ExaBR as follows:
Section 5.1.1, "Backing Up User vServers Created Using EECS 2.0.6 Guest Base Template"
Section 5.1.2, "Backing Up User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier"
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. By default, these LVM snapshots stored in the /exalogic-lcdata/backups
directory.
Note:
ExaBR does not support STIG-hardened user vServers.ExaBR backs up a user vServer using LVM-based snapshots, by doing the following tasks:
Creates an LVM-based snapshot of the vServer file system.
Mounts the snapshot.
Creates an archive of the mounted file system from the snapshot.
Unmounts and deletes the snapshot.
When restoring LVM-based backups, ExaBR replaces files that were backed up. However, any files that were created after the backup was made are not deleted during a restore
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."
The following are the prerequisites for using LVM-based snapshots to back up Linux compute nodes with ExaBR:
When ExaBR takes the first backup, swap space should not be in use. During the first backup, ExaBR allocates 1 GB of the swap space for all subsequent LVM-based snapshots.
If there is free memory on the user vServer, you can free the swap space by logging in to the user vServer as the root
user and running the following commands:
swapoff -av swapon -a
The logical volume group that contains the root (/) volume should have at least 1 GB of unused space or more than 512 MB of swap space. Use the vgs
command to display the amount of available free space (VFree
column).
The share you back up to must have enough free space for the extraction of the LVM-based snapshot.
You can use ExaBR to take LVM-based snapshots as backups for these vServers, by doing the following:
Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."
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.
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."
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.
By default, the backups are stored in the /exalogic-lcdata/backups
directory.
To restore backups made using this procedure, see Section 5.2.1, "Restoring User vServers Created Using EECS 2.0.6 Guest Base Template."
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 theinit-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:
Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."
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
You can restore user vServers using ExaBR as follows:
Section 5.2.1, "Restoring User vServers Created Using EECS 2.0.6 Guest Base Template"
Section 5.2.2, "Restoring User vServers Created Using EECS 2.0.4 Guest Base Template or Earlier"
This section describes restoring vServers that you backed up using LVM snapshots, as described in Section 5.1.1, "Backing Up User vServers Created Using EECS 2.0.6 Guest Base Template."
When restoring LVM-based backups, ExaBR replaces files that were backed up. However, any files that were created after the backup was made are not deleted during a restore.
Restore user vServers that you backed up, 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.Note:
ExaBR does not support STIG-hardened user vServers.Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."
Ensure that the addresses of the vServers you want to restore exist in the exabr.config
file in the user-vm
parameter.
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.
If a user vServer you want to restore has corrupted data in one of the following ways:
Not accessible through SSH.
Essential binaries such as bash
and tar
do not exist.
Do the following:
Log in to Exalogic Control.
Note the name, IP address, and vServer type of the vServer that has corrupted data.
Delete the vServer in Exalogic Control.
Recreate the vServer with the name, IP address, and vServer type you noted in step b.
You can restore user vServers by running ExaBR as follows:
If the data of the user vServer was not corrupted, run ExaBR as follows:
./exabr restore address_of_vServer [options]
For a complete list of options, see Section 2.4.2, "ExaBR Options."
Examples:
./exabr restore 192.168.1.2 -b 201309121315
In the first example, ExaBR restores the user vServer with the address 192.168.1.2
from the backup called 201309121315
.
./exabr restore 192.168.1.2 -b 201309121315 --include-paths /home/Oracle
In the second example, ExaBR restores the /home/Oracle
directory of the user vServer with the address 192.168.1.2
from the backup called 201309121315
.
If the data of the user vServer was corrupted as described in step 4, run ExaBR as follows:
./exabr restore address_of_vServer --exclude-paths /etc/sysconfig/network-scripts [options]
For a complete list of options, see Section 2.4.2, "ExaBR Options."
Note:
When restoring a user vServer, if you see the following error:
"ERROR: directory_name Cannot change ownership to ..."
When running the restore command, use the --exclude-paths
option to exclude the directory displayed in the error.
For an error such as:
ERROR tar: /u01/common/general: Cannot change ownership to uid 1000, gid 54321:
Run the restore command as in the following example:
./exabr restore 192.168.1.2 -b 201308230428 --exclude-paths /u01/common/general
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.Perform the tasks described in Section 2.2, "Preparing to Use ExaBR."
Use Exalogic Control to stop the vServer you want to restore.
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.
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.
After the restoration is complete, log in to all the restored vServers
Log in to Exalogic Control as the root
user.
From the navigation pane on the left, click vDC Management.
Expand your cloud, such as MyCloud
.
Expand Accounts.
Expand the account to which the vServer you restored belongs, such as Dept1
.
All the vServers in the account are displayed.
Select the vServer you restored.
The dashboard of the vServer is displayed.
From the actions pane on the right, click Launch Virtual Console and monitor the vServer startup. If any disk issue is detected, fdisk
starts automatically.