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.

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 the data domain's internal .profile file, from the previously exported data domain. If you are importing a data domain index from a version that is earlier than Endeca Server 7.6.1.13, the data domain's .profile does not exist in the index of such a data domain. Therefore, when you import it, you must specify that data domain's profile name (if you have it). If you don't have the data domain's profile name, then the new data domain will be created based on the imported index based on the default data domain profile.

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.

To export and import the data domain:

  1. Use a command-line window and navigate to the endeca-cmd directory.
  2. Use the options as shown in the following examples:
    • To export, use:
      endeca-cmd export-dd my_dd --offline-name my_dd_offline

      This example exports the data domain's index named 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 it, 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.
    • To import, use:
      endeca-cmd import-dd new_dd --offline-name my_dd_offline --dd-profile-name --is-enabled false

      This example imports the index my_dd_offline into the new data domain new_dd, which is created with the .profile data domain profile (stored in the index of the previously exported data domain). Observe that because --is-enabled false, the data domain is not enabled after it is created.

      Importing assumes that you have previously created a data domain whose index is currently exported, and kept track of the --offline-name value you used when exporting, or know the name that was automatically assigned.

      Note: Starting with Endeca Server version 7.6.1.13, each previously exported data domain contains a .profile internal file, as part of its index. This file is used as a data domain profile when you import the index and create a new data domain based on this index. However, if you are importing a data domain from a version before Endeca Server 7.6.1.13, then its index does not have the .profile file. (You are required to know the data domain profile name, and also to have this profile created in your Endeca Server deployment.) When you import this index, you can then either specify the data domain profile name (if you have it and if this data domain profile exists in your cluster), or if you don't have the data domain profile for the domain you are trying to import, then Endeca Server imports the index (which includes .profile) and creates the data domain based on the .profile.

Note that in step 2, if you are 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/2/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/2/0"
      xmlns:ns3="http://www.endeca.com/endeca-server/manage/2/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. This data domain is enabled once it is created:
<ns1:importDataDomain xmlns:ns1="http://www.endeca.com/endeca-server/manage/2/0">
    <ns1:name>new_dd</ns1:name>
    <ns1:nameOfOfflineDataDomain>my_offline_index</ns1:nameOfOfflineDataDomain>
    <ns1:enabled>true</ns1:enabled>
</ns1:importDataDomain>

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