public class BackupService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BackupService.Activity
An abstract activity used for the various backup and restore operations.
|
static class |
BackupService.BackupActivity
The
BackupService.Activity subclass that performs content backup operations. |
protected static class |
BackupService.FieldName |
static class |
BackupService.RestoreActivity
The
BackupService.Activity subclass that performs content restore operations. |
Modifier and Type | Field and Description |
---|---|
protected static String |
BINARY_AREA_DIR_NAME |
protected static String |
BINARY_EXTENSION |
protected static String |
CHANGED_AREA_DIR_NAME |
protected static String |
DOCUMENTS_FILENAME_PREFIX |
protected static Logger |
LOGGER |
protected static int |
NUM_CHARS_IN_FILENAME_SUFFIX |
protected static String |
SUMMARY_FILE_NAME |
Modifier | Constructor and Description |
---|---|
protected |
BackupService(JcrRepository.RunningState runningState) |
Modifier and Type | Method and Description |
---|---|
Problems |
backupRepository(File backupDirectory,
BackupOptions options)
Start backing up the repository.
|
BackupService.BackupActivity |
createBackupActivity(File backupDirectory,
BackupOptions options)
Create a new
activity instance that can back up the content of the repository as it exists at the
time the activity is executed. |
BackupService.RestoreActivity |
createRestoreActivity(File backupDirectory,
RestoreOptions options)
Create a new
activity instance that can restore the content of the repository to the state as it
exists in the specified backup directory. |
Problems |
restoreRepository(JcrRepository repository,
File backupDirectory,
RestoreOptions options)
Start asynchronously backing up the repository.
|
protected void |
shutdown()
Shut down this service and immediately terminate all currently-running backup operations.
|
protected static final Logger LOGGER
protected static final String CHANGED_AREA_DIR_NAME
protected static final String BINARY_AREA_DIR_NAME
protected static final String DOCUMENTS_FILENAME_PREFIX
protected static final String SUMMARY_FILE_NAME
protected static final String BINARY_EXTENSION
protected static final int NUM_CHARS_IN_FILENAME_SUFFIX
protected BackupService(JcrRepository.RunningState runningState)
protected void shutdown()
public Problems backupRepository(File backupDirectory, BackupOptions options) throws RepositoryException
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existoptions
- a BackupOptions
instance controlling the behavior of the backup; may not be
null
RepositoryException
- if the backup operation cannot be runpublic Problems restoreRepository(JcrRepository repository, File backupDirectory, RestoreOptions options) throws RepositoryException
repository
- the JCR repository to be backed up; may not be nullbackupDirectory
- the directory on the file system that contains the backup; this directory obviously must existoptions
- a RestoreOptions
instance which controls the restore behavior; may not be nullRepositoryException
- if the restoration operation cannot be runpublic BackupService.BackupActivity createBackupActivity(File backupDirectory, BackupOptions options)
activity
instance that can back up the content of the repository as it exists at the
time the activity is executed.backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existoptions
- the BackupOptions
which customize the behavior of the backup.public BackupService.RestoreActivity createRestoreActivity(File backupDirectory, RestoreOptions options)
activity
instance that can restore the content of the repository to the state as it
exists in the specified backup directory.options
- a RestoreOptions
instance; may no be null.backupDirectory
- the directory on the file system that contains the backup; this directory obviously must existCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.