Exporting and importing a data domain

Exporting a data domain takes a snapshot of the data domain's index files, which is useful for backups. Importing a data domain lets you create a new data domain based on an exported index.

When you export a data domain, the Endeca Server takes a snapshot of its index files and stores it in the offline directory on a shared file system. While the data domain's index is exported, the data domain continues to run. If you need to export the same data domain again, use a different name for its exported index.

Note: A snapshot represents a copy of the index files only, and does not capture any other characteristics of the data domain, such as its profile. This means that when you subsequently import the data domain from the snapshot, the Endeca Server creates a new data domain based on the same index, using one of the data domain profiles.

When you import a data domain, the previously taken snapshot of the index files is copied from the specified index label and a new data domain is created with the specified data domain profile. You can optionally specify whether the new data domain should be enabled. The new data domain will use the index files copied from the snapshot.

Before exporting a data domain, note the following:
  • On Linux, the data domain can either be enabled or disabled.
  • On Windows, the data domain must be disabled.

To export and import the data domain:

  1. Use a command-line window (for example, open a Command Prompt in Windows) and navigate to the endeca-cmd directory.
  2. Use the options as shown in the following examples:
    Option Description
    Exporting:
    endeca-cmd export-dd my_dd 
    --offline-name my_dd_offline
    This example of the command exports the index of the data domain my_dd to the index file named my_dd_offline. (You can provide your own names). The exported index is stored in the offline directory. The name you specify for --offline-name must be unique, or you can omit it. If you omit the name, it is assigned automatically, by appending the date to the original data domain name, as in this format: name_MMMMM-dd-yyyy-hh-mm. The successful response to this request returns the resulting name used for the exported index.
    Important: Keep track of the value of --offline-name, because you will need it later for importing this index.
    Importing:
    endeca-cmd 
    import-dd new_dd 
    --offline-name my_dd_offline
    --dd-profile-name TestDDProfile 
    --is-enabled false
    This example of the command imports the index my_dd_offline into the new data domain new_dd, which is created with the TestDDProfile data domain profile and is not enabled after it is created.
    Note: Importing assumes that you have previously created a data domain whose index is currently exported; it also assumes that you kept track of the --offline-name value you used when exporting, or know the name that was automatically assigned.

    If not using endeca-cmd, you can use the importDataDomain and exportDataDomain operations in the requests of the Manage Web Service, as in these abbreviated examples.

    Here is an example of the export operation that exports the index for data domain my_dd:
    <ns1:exportDataDomain xmlns:ns1="http://www.endeca.com/endeca-server/manage/1/0">
                <ns1:name>my_dd</ns1:name>
                <ns1:nameOfOfflineDataDomain>my_offline_index</ns1:nameOfOfflineDataDomain>
    </ns1:exportDataDomain>
    It produces the following response:
    <ns3:exportDataDomainResponse
        xmlns:ns2="http://www.endeca.com/endeca-server/types/1/0"
        xmlns:ns3="http://www.endeca.com/endeca-server/manage/1/0">
       <ns3:exportName>my_offline_index</ns3:exportName>
    </ns3:exportDataDomainResponse>

    Where my_offline_index is the name of the exported index files.

    Here is an example of the import operation that creates a new data domain new_dd, based on the default data domain profile. This data domain is enabled once it is created:
    <ns1:importDataDomain xmlns:ns1="http://www.endeca.com/endeca-server/manage/1/0">
                <ns1:name>new_dd</ns1:name>
                <ns1:nameOfOfflineDataDomain>my_offline_index</ns1:nameOfOfflineDataDomain>
                <ns1:ddProfileName>default</ns1:ddProfileName>
                <ns1:enabled>true</ns1:enabled>
            </ns1:importDataDomain>

    If the operation runs successfully, an empty importDataDomainResponse is returned.