org.exist.storage
Class BackupSystemTask
java.lang.Object
org.exist.storage.BackupSystemTask
- All Implemented Interfaces:
- SystemTask
public class BackupSystemTask
- extends Object
- implements SystemTask
BackupSystemTask creates an XML backup of the current database into a directory
or zip file. Running the backup as a system task guarantees a consistent backup. No
other transactions will be allowed while the backup is in progress.
The following properties can be used to configure the backup task if passed to the
configure(org.exist.util.Configuration, java.util.Properties)
method:
collection |
the collection to backup, specified as an absolute path into the db, e.g. /db/back-me-up |
user |
a valid user for writing the backup. Usually, this needs to be a user in the dba
database admin group. |
password |
the password for the user |
dir |
the output directory where the backup will be written |
prefix |
a prefix for the generated file name. the final file name will consist of
prefix + current-dateTime + suffix |
suffix |
a suffix for the generated file name. If it ends with .zip, BackupSystemTask will
directly write the backup into a zip file. Otherwise, it will write into a plain directory. |
BackupSystemTask
public BackupSystemTask()
configure
public void configure(Configuration config,
Properties properties)
throws EXistException
- Specified by:
configure
in interface SystemTask
- Throws:
EXistException
execute
public void execute(DBBroker broker)
throws EXistException
- Description copied from interface:
SystemTask
- Execute this task.
- Specified by:
execute
in interface SystemTask
- Parameters:
broker
- a DBBroker object that can be used
- Throws:
EXistException
purgeZipFiles
public void purgeZipFiles()
Copyright (C) Wolfgang Meier. All rights reserved.