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 |
static boolean |
DEFAULT_COMPRESS |
static long |
DEFAULT_NUMBER_OF_DOCUMENTS_IN_BACKUP_FILES
By default, 100K nodes will be exported to a single backup file.
|
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)
Start asynchronously backing up the repository.
|
Problems |
backupRepository(File backupDirectory,
long documentsPerFile,
boolean compress)
Start asynchronously backing up the repository.
|
BackupService.BackupActivity |
createBackupActivity(File backupDirectory,
long documentsPerFile,
boolean compress)
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)
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)
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
public static final long DEFAULT_NUMBER_OF_DOCUMENTS_IN_BACKUP_FILES
public static final boolean DEFAULT_COMPRESS
protected BackupService(JcrRepository.RunningState runningState)
protected void shutdown()
public Problems backupRepository(File backupDirectory) throws RepositoryException
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existRepositoryException
- if the backup operation cannot be runpublic Problems backupRepository(File backupDirectory, long documentsPerFile, boolean compress) throws RepositoryException
backupDirectory
- the directory on the file system into which the backup should be placed; this directory should
typically not existdocumentsPerFile
- the maximum number of documents to place within a single backup file; must be positivecompress
- true if the backup files should be compressed, or false otherwiseRepositoryException
- if the backup operation cannot be runpublic Problems restoreRepository(JcrRepository repository, File backupDirectory) 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 existRepositoryException
- if the restoration operation cannot be runpublic BackupService.BackupActivity createBackupActivity(File backupDirectory, long documentsPerFile, boolean compress)
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 existdocumentsPerFile
- the maximum number of documents to place within a single backup file; must be positivecompress
- true if the backup files should be compressed, or false otherwisepublic BackupService.RestoreActivity createRestoreActivity(File backupDirectory)
activity
instance that can restore the content of the repository to the state as it
exists in the specified backup directory.backupDirectory
- the directory on the file system that contains the backup; this directory obviously must existCopyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.