Loading Content and Metadata from an Archive
Follow this procedure to import content and metadata from a database archive created by the mlcp export
command. A database archive is stored in one or more compressed files that contain documents and metadata.
Set
-input_file_path
:To load a single archive file, set
-input_file_path
to that file.To load multiple archive files, set
-input_file_path
to a directory containing the compressed archive files.
Set
-document_type
tomixed
, or leave it unset sincemixed
is the default setting.Set
-input_compressed
totrue
.Set
-input_file_type
toarchive
.If the input archive was created without any metadata, set
-archive_metadata_optional
to true. If this is not set, an exception is thrown if the archive contains no metadata.If you want to exclude some or all of the document metadata in the archive:
Set
-copy_collections
tofalse
to exclude document collections metadata.Set
-copy_permissions
tofalse
to exclude document permissions metadata.Set
-copy_properties
tofalse
to exclude document properties.Set
-copy_quality
tofalse
to exclude document quality metadata.Set
-copy_metadata
to false to exclude key-value metadata.
An archive is assumed to contain metadata. However, it is possible to create archives without metadata by setting all the metadata copying options (-copy_collections
, -copy_permissions
, etc.) to false during export. If an archive does not contain metadata, you must set -archive_metadata_optional
to tell mlcp to proceed in the absence of metadata.
Note
When you import properties from an archive, you should disable the “maintain last modified” configuration option on the destination database during the import. Otherwise, you can get an XDMP-SPECIALPROP
error if the import operation tries to update the last modified property. To disable this setting, use the Admin Interface or the library function admin:set-maintain-last-modified
.
The following example command loads the database archive in /space/archive_dir
:
# Windows users, see Modifying the Example Commands for Windows $ mlcp.sh import -host localhost -port 8000 -username user \ -password password -mode local -input_file_type archive \ -input_file_path /space/archive_dir