Oracle Logical Domains (LDOM) Back up & Restoration from Backup Files

Saving Domain Configurations for Future Rebuilding

The basic process is to save the resource constraints information for each domain into an XML file, which can then be re-issued to the Logical Domains Manager, for example, after a hardware failure to rebuild a desired configuration.

Restore a Domain Configuration From an XML File (ldm add-domain) works for guest domains, but not for the control (primary) domain. You can save the primary domain's constraints to an XML file, but you cannot feed the file back into the ldm add-domain -i command. However, you can use the ldm init-system command and the resource constraints from the XML file to reconfigure your primary domain. You can also use the ldm init-system command to reconfigure other domains that are described in the XML file, but those domains are left inactive when the configuration is complete.

The method that follows does not preserve actual bindings, only the constraints used to create those bindings. This means that, after this procedure, the domains will have the same virtual resources, but will not necessarily be bound to the same physical resources.

Save Domain Configurations

This procedure shows how to save a domain configuration for a single domain or for all the domains on a system.

  • Save a domain configuration for one or more domains.
    • To save the configuration for a single domain, create an XML file containing the domain's constraints.
      # ldm list-constraints -x ldom >ldom.xml

      The following example shows how to create an XML file, ldg1.xml, which contains the ldg1 domain's constraints:

      # ldm list-constraints -x ldg1 >ldg1.xml
    • To save the configurations for all the domains on a system, create an XML file containing the constraints for all domains.
      # ldm list-constraints -x >file.xml

      The following example shows how to create an XML file, config.xml, which contains the constraints for all the domains on a system:

      # ldm list-constraints -x >config.xml

Restore a Domain Configuration From an XML File (ldm add-domain)

Instead of this procedure, you can use the ldm init-system command to restore domain configurations from an XML file. See Restore a Domain Configuration From an XML File (ldm init-system).

  1. Create the domain by using the XML file that you created as input.
    # ldm add-domain -i ldom.xml
  2. Bind the domain.
    # ldm bind-domain ldom
  3. Start the domain.
    # ldm start-domain ldom

Example 11-1 Restoring a Single Domain From an XML File

The following example shows how to restore a single domain. First, you restore the ldg1 domain from the XML file. Then, you bind and restart the ldg1 domain that you restored.

# ldm add-domain -i ldg1.xml
# ldm bind ldg1
# ldm start ldg1

Restore a Domain Configuration From an XML File (ldm init-system)

This procedure explains how to use the ldm init-system command with an XML file to re-create a previously saved configuration. The XML file describes one or more domain configurations. The XML file can be created by running the ldm ls-constraints -x command. The ldm init-system command is expected to be run in the factory-default configuration, but it can restore any configuration from an XML file. The primary domain is reconfigured as specified in the file, and any non-primary domains that have configurations in the XML file are reconfigured but left inactive.

Instead of this procedure, you can use the ldm add-domain command to restore a single domain configuration from an XML file. See Restore a Domain Configuration From an XML File (ldm add-domain).

  1. Log in to the primary domain.
  2. Verify that the system is in the factory-default configuration.
    primary# ldm list-config | grep "factory-default"
    factory-default [current]

    If the system is not in the factory-default configuration, see Restore the Factory Default Configuration.

  3. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  4. Restore the domain configuration or configurations from the XML file.
    # ldm init-system [-rs] -i filename.xml

    The -r option reboots the primary domain after the configuration. If you do not specify the -r option, you must perform the reboot manually. The -s option restores only the virtual services configuration (vdsvcc, and vsw) and might be able to be performed without having to reboot.

Example 11-2 Restoring Domains From XML Configuration Files

The following examples show how to use the ldm init-system command to restore the primary domain and all the domains on a system from the factory-default configuration.

  • Restore the primary domain. The -r option is used to reboot the primary domain after the configuration completes. The primary.xml file contains the XML domain configuration that you saved at an earlier time.

    primary# ldm init-system -r -i primary.xml
  • Restore all the domains on a system. Restore the domains on the system to the configurations in the config.xml XML file. The config.xml file contains the XML domain configurations that you saved at an earlier time. The primary domain is restarted automatically by the ldm init-system command. Any other domains are restored, but not bound and restarted.

    # ldm init-system -r -i config.xml

    After the system reboots, the following commands bind and restart the ldg1 and ldg2 domains:

    # ldm bind ldg1
    # ldm start ldg1
    # ldm bind ldg2
    # ldm start ldg2

Comments

Popular posts from this blog

Veritas Cluster Server (VCS) Commands - Cheat Sheet

Solaris 11.4 Network Administration Cheatsheet