Loading Content and Metadata from an Archive
- Last Updated: April 14, 2026
- 2 minute read
- MarkLogic Server
- Version 10.0
- Documentation
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_pathto that file. -
To load multiple archive files, set
-input_file_pathto a directory containing the compressed archive files.
-
-
Set
-document_typetomixed, or leave it unset sincemixedis the default setting. -
Set
-input_compressedtotrue. -
Set
-input_file_typetoarchive. -
If the input archive was created without any metadata, set
-archive_metadata_optionalto 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_collectionstofalseto exclude document collections metadata. -
Set
-copy_permissionstofalseto exclude document permissions metadata. -
Set
-copy_propertiestofalseto exclude document properties. -
Set
-copy_qualitytofalseto exclude document quality metadata. -
Set
-copy_metadatato 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