Daisy documentation
 PreviousHomeNext 
6.3.4 Book StoreBook Index7.1.2 Basic usage scenario

7 Import/export

7.1 Import/export introduction

The export and import tools allow to copy (synchronize, replicate) documents between Daisy repositories that have different namespaces.

It is required that the repositories have different namespaces in order to keep the identity of the documents. For one-time transfer of documents from one repository to another, a tool could be made which recreates the documents in the target repository without preserving their IDs, which would then also require adjusting links in the content of documents. However, the import/export tools documented here do not cover this use-case.

An export not only contains documents but also schema, variant and namespace information.

The export tool can export all documents or subsets of documents (expressed using queries or a manual enumeration). Both upon export and import, manipulation of the content is possible. There are some built-in possibilities, e.g. to drop fields and parts from a document upon export or import, and for ultimate flexibility you can implement custom logic in a Java class. The import tool is smart enough to not update documents if there are no changes, so that no unncessary update events are caused.

The export and import tools are command-line applications, though the code is designed such that adding other user interfaces, or integration in for example the Daisy Wiki, should be possible.

Note that version history or time/user of the last modification is not exported/imported, the import tool simply uses the normal Daisy APIs to create/update content in the target repository. As such, the export/import tools are not a replacement for backup.

7.1.1 Applications

Export/import can be used for various purposes:

 PreviousHomeNext 
6.3.4 Book Store7.1.2 Basic usage scenario