org.exist.backup
Class SystemExport
java.lang.Object
org.exist.backup.SystemExport
public class SystemExport
- extends Object
Embedded database export tool class. Tries to export as much data as
possible, even if parts of the collection hierarchy are corrupted or
documents are no longer readable. Features:
- Descendant collections will be exported properly even if their ancestor
collection is corrupted.
- Documents which are intact but belong to a destroyed collection will be
stored into a special collection /db/__lost_and_found__.
- Damaged documents are detected by ConsistencyCheck and are removed from
the backup.
- The format of the exported data is compatible with backups generated
via the standard backup tool (Java admin client).
The class should be used in combination with ConsistencyCheck
.
The error lists returned by ConsistencyCheck can be passed to export(String, java.util.List)
.
defaultOutputProperties
public Properties defaultOutputProperties
contentsOutputProps
public Properties contentsOutputProps
SystemExport
public SystemExport(DBBroker broker,
SystemExport.StatusCallback callback)
export
public void export(String target,
List errorList)
- Export the contents of the database, trying to preserve
as much data as possible. To be effective, this method
should be used in combination with class
ConsistencyCheck
.
- Parameters:
target
- the output directory or file to which data will be written.
Output will be written to a zip file if target ends with .zip.errorList
- a list of ErrorReport
objects as returned by
methods in ConsistencyCheck
.
getUniqueFile
public static File getUniqueFile(String base,
String extension,
String dir)
Copyright (C) Wolfgang Meier. All rights reserved.