public class BackupManagerImpl extends Object implements ExtendedBackupManager, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
BACKUP_DIR
Name of backup dir parameter in configuration.
|
static String |
BACKUP_PROPERTIES
Name of backup properties parameter in configuration.
|
static String |
DEFAULT_INCREMENTAL_JOB_PERIOD
Name of default incremental job period parameter in configuration.
|
static String |
DEFAULT_VALUE_FULL_BACKUP_TYPE
Default value of incremental backup type parameter in configuration.
|
static String |
DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE
Default value of incremental backup type parameter in configuration.
|
static String |
DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD
Default value of incremental job period parameter in configuration.
|
static String |
FULL_BACKUP_TYPE
Name of full backup type parameter in configuration.
|
static String |
INCREMENTAL_BACKUP_TYPE
Name of incremental backup type parameter in configuration.
|
protected static org.exoplatform.services.log.Log |
LOG |
protected CopyOnWriteArrayList<JobRepositoryRestore> |
restoreRepositoryJobs
The list of repository restore job.
|
FULL_AND_INCREMENTAL, FULL_BACKUP_ONLY| Constructor and Description |
|---|
BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService)
BackupManagerImpl constructor.
|
BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService,
RegistryService registryService)
BackupManagerImpl constructor.
|
BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService)
BackupManagerImpl constructor.
|
BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService,
RegistryService registryService)
BackupManagerImpl constructor.
|
| Modifier and Type | Method and Description |
|---|---|
BackupChain |
findBackup(String backupId)
Finding current backup by identifier.
|
BackupChain |
findBackup(String repository,
String workspace)
Finding current backup by repository and workspace.
|
RepositoryBackupChain |
findRepositoryBackup(String repository)
Finding current backup by repository.
|
RepositoryBackupChain |
findRepositoryBackupId(String backupId)
Finding current backup by id.
|
File |
getBackupDirectory()
Getting backup directory.
|
BackupChainLog[] |
getBackupsLogs()
Getting all backup logs .
|
Set<BackupChain> |
getCurrentBackups()
Getting current backups.
|
Set<RepositoryBackupChain> |
getCurrentRepositoryBackups()
Getting current repository backups.
|
long |
getDefaultIncrementalJobPeriod()
Getting default incremental job period.
|
String |
getFullBackupType()
Getting full backup type.
|
String |
getIncrementalBackupType()
Getting incremental backup type.
|
JobRepositoryRestore |
getLastRepositoryRestore(String repositoryName)
Getting last repository restore by repository name.
|
JobWorkspaceRestore |
getLastRestore(String repositoryName,
String workspaceName)
Getting last restore by repository and workspace name.
|
BackupMessage[] |
getMessages()
Getting the backup messages.
|
RepositoryBackupChainLog[] |
getRepositoryBackupsLogs()
Getting all repository backup logs.
|
List<JobRepositoryRestore> |
getRepositoryRestores()
Getting list of repository restores.
|
List<JobWorkspaceRestore> |
getRestores()
Getting list of restores.
|
void |
restore(BackupChainLog log,
String repositoryName,
WorkspaceEntry workspaceEntry,
boolean asynchronous)
Restore from backup.
|
void |
restore(RepositoryBackupChainLog log,
RepositoryEntry repositoryEntry,
boolean asynchronous)
Repository restore from backup.
|
void |
restore(RepositoryBackupChainLog log,
RepositoryEntry repositoryEntry,
boolean asynchronous,
boolean removeJobOnceOver)
Repository restore from backup.
|
void |
restore(RepositoryBackupChainLog rblog,
RepositoryEntry repositoryEntry,
Map<String,String> workspaceNamesCorrespondMap,
boolean asynchronous)
Repository restore from backup.
|
void |
restoreExistingRepository(File repositoryBackupSetDir,
boolean asynchronous)
Restore existing repository.
|
void |
restoreExistingRepository(RepositoryBackupChainLog rblog,
RepositoryEntry repositoryEntry,
boolean asynchronous)
Restore existing repository.
|
void |
restoreExistingRepository(String repositoryBackupIdentifier,
boolean asynchronous)
Restore existing repository.
|
void |
restoreExistingRepository(String repositoryBackupIdentifier,
RepositoryEntry repositoryEntry,
boolean asynchronous)
Restore existing repository.
|
void |
restoreExistingWorkspace(BackupChainLog log,
String repositoryName,
WorkspaceEntry workspaceEntry,
boolean asynchronous)
Restore existing workspace.
|
void |
restoreExistingWorkspace(File workspaceBackupSetDir,
boolean asynchronous)
Restore existing workspace.
|
void |
restoreExistingWorkspace(String workspaceBackupIdentifier,
boolean asynchronous)
Restore existing workspace.
|
void |
restoreExistingWorkspace(String workspaceBackupIdentifier,
String repositoryName,
WorkspaceEntry workspaceEntry,
boolean asynchronous)
Restore existing workspace.
|
protected void |
restoreOverInitializer(BackupChainLog log,
String repositoryName,
WorkspaceEntry workspaceEntry) |
void |
restoreRepository(File repositoryBackupSetDir,
boolean asynchronous)
ReprositoryEntry for restore should be contains in BackupChainLog.
|
void |
restoreRepository(String repositoryBackupIdentifier,
boolean asynchronous)
ReprositoryEntry for restore should be contains in BackupChainLog.
|
void |
restoreWorkspace(File workspaceBackupSetDir,
boolean asynchronous)
WorkspaceEntry for restore should be contains in BackupChainLog.
|
void |
restoreWorkspace(String workspaceBackupIdentifier,
boolean asynchronous)
WorkspaceEntry for restore should be contains in BackupChainLog.
|
void |
start() |
BackupChain |
startBackup(BackupConfig config)
Starting backup.
|
RepositoryBackupChain |
startBackup(RepositoryBackupConfig config)
Starting repository backup.
|
void |
stop() |
void |
stopBackup(BackupChain backup)
Stop backup.
|
void |
stopBackup(RepositoryBackupChain backup)
Stop backup.
|
protected static final org.exoplatform.services.log.Log LOG
public static final String DEFAULT_INCREMENTAL_JOB_PERIOD
public static final String BACKUP_PROPERTIES
public static final String FULL_BACKUP_TYPE
public static final String INCREMENTAL_BACKUP_TYPE
public static final String DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD
public static final String DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE
public static final String DEFAULT_VALUE_FULL_BACKUP_TYPE
public static final String BACKUP_DIR
protected CopyOnWriteArrayList<JobRepositoryRestore> restoreRepositoryJobs
public BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService)
initParams - InitParams, the init parametersrepoService - RepositoryService, the repository servicepublic BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService)
initParams - InitParams, the init parametersrepoService - RepositoryService, the repository servicepublic BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService,
RegistryService registryService)
repoService - RepositoryService, the repository serviceregistryService - RegistryService, the registry servicepublic BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
org.exoplatform.container.xml.InitParams initParams,
RepositoryService repoService,
RegistryService registryService)
repoService - RepositoryService, the repository serviceregistryService - RegistryService, the registry servicepublic Set<BackupChain> getCurrentBackups()
getCurrentBackups in interface BackupManagerpublic BackupMessage[] getMessages()
getMessages in interface BackupManagerpublic BackupChainLog[] getBackupsLogs()
getBackupsLogs in interface BackupManagerpublic RepositoryBackupChainLog[] getRepositoryBackupsLogs()
getRepositoryBackupsLogs in interface BackupManagerprotected void restoreOverInitializer(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry) throws BackupOperationException, javax.jcr.RepositoryException, RepositoryConfigurationException, BackupConfigurationException
BackupOperationExceptionjavax.jcr.RepositoryExceptionRepositoryConfigurationExceptionBackupConfigurationExceptionpublic BackupChain startBackup(BackupConfig config) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
startBackup in interface BackupManagerconfig - BackupConfig, the backup configurationBackupOperationException - BackupOperationException
will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic void stopBackup(BackupChain backup)
stopBackup in interface BackupManagerbackup - BackupChain, the backup chainpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic BackupChain findBackup(String repository, String workspace)
findBackup in interface BackupManagerrepository - String, the repository nameworkspace - String, the workspace namepublic BackupChain findBackup(String backupId)
findBackup in interface BackupManagerbackupId - String the backup identifierpublic File getBackupDirectory()
getBackupDirectory in interface BackupManagerpublic String getFullBackupType()
getFullBackupType in interface BackupManagerpublic String getIncrementalBackupType()
getIncrementalBackupType in interface BackupManagerpublic long getDefaultIncrementalJobPeriod()
getDefaultIncrementalJobPeriod in interface BackupManagerpublic List<JobWorkspaceRestore> getRestores()
getRestores in interface BackupManagerpublic JobWorkspaceRestore getLastRestore(String repositoryName, String workspaceName)
getLastRestore in interface BackupManagerrepositoryName - String, the repository nameworkspaceName - String, the workspace namepublic JobRepositoryRestore getLastRepositoryRestore(String repositoryName)
getLastRepositoryRestore in interface BackupManagerrepositoryName - String, the repository namepublic List<JobRepositoryRestore> getRepositoryRestores()
BackupManagergetRepositoryRestores in interface BackupManagerpublic void restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
restore in interface BackupManagerlog - BackupChainLog, the backup logrepositoryName - String, repository nameworkspaceEntry - WorkspaceEntry, the workspace entryasynchronous - boolean, in 'true' then asynchronous restore.BackupOperationException - will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic void restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
restore in interface BackupManagerlog - RepositoryBackupChainLog, the repository backup logrepositoryEntry - RepositoryEntry, the repository entryasynchronous - boolean, in 'true' then asynchronous restore.BackupOperationException - will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic void restore(RepositoryBackupChainLog log, RepositoryEntry repositoryEntry, boolean asynchronous, boolean removeJobOnceOver) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
restore in interface BackupManagerlog - RepositoryBackupChainLog, the repository backup logrepositoryEntry - RepositoryEntry, the repository entryasynchronous - boolean, in 'true' then asynchronous restore.removeJobOnceOver - boolean, in 'true' then restore job well remove after restore.BackupOperationException - will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic void restore(RepositoryBackupChainLog rblog, RepositoryEntry repositoryEntry, Map<String,String> workspaceNamesCorrespondMap, boolean asynchronous) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
restore in interface BackupManagerrblog - RepositoryBackupChainLog, the repository backup logrepositoryEntry - RepositoryEntry, the repository entryworkspaceNamesCorrespondMap - Mapasynchronous - boolean, in 'true' then asynchronous restore.BackupOperationException - will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic RepositoryBackupChain startBackup(RepositoryBackupConfig config) throws BackupOperationException, BackupConfigurationException, javax.jcr.RepositoryException, RepositoryConfigurationException
startBackup in interface BackupManagerconfig - RepositoryBackupConfig, the backup configuration to repositoryBackupOperationException - BackupOperationException
will be generate the exception BackupOperationExceptionBackupConfigurationException - will be generate the exception BackupConfigurationExceptionjavax.jcr.RepositoryException - will be generate the exception RepositoryExceptionRepositoryConfigurationException - will be generate the exception RepositoryConfigurationExceptionpublic void stopBackup(RepositoryBackupChain backup)
stopBackup in interface BackupManagerbackup - RepositoryBackupChain, the repositroy backup chainpublic RepositoryBackupChain findRepositoryBackup(String repository)
findRepositoryBackup in interface BackupManagerpublic Set<RepositoryBackupChain> getCurrentRepositoryBackups()
getCurrentRepositoryBackups in interface BackupManagerpublic RepositoryBackupChain findRepositoryBackupId(String backupId)
findRepositoryBackupId in interface BackupManagerpublic void restoreExistingRepository(RepositoryBackupChainLog rblog, RepositoryEntry repositoryEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingRepository in interface ExtendedBackupManagerrblog - repository backup logrepositoryEntry - new repository configurationasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingRepository(String repositoryBackupIdentifier, RepositoryEntry repositoryEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingRepository in interface ExtendedBackupManagerrepositoryBackupIdentifier - backup identifierrepositoryEntry - new repository configurationasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingWorkspace(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingWorkspace in interface ExtendedBackupManagerlog - workspace backup logworkspaceEntry - new workspace configurationasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingWorkspace(String workspaceBackupIdentifier, String repositoryName, WorkspaceEntry workspaceEntry, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingWorkspace in interface ExtendedBackupManagerworkspaceBackupIdentifier - backup identifierworkspaceEntry - new workspace configurationasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingRepository(String repositoryBackupIdentifier, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingRepository in interface ExtendedBackupManagerrepositoryBackupIdentifier - identifier to repository backup.asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingWorkspace(String workspaceBackupIdentifier, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingWorkspace in interface ExtendedBackupManagerworkspaceBackupIdentifier - identifier to workspace backup.asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreRepository(String repositoryBackupIdentifier, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreRepository in interface ExtendedBackupManagerrepositoryBackupIdentifier - identifier to repository backup.asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreWorkspace(String workspaceBackupIdentifier, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreWorkspace in interface ExtendedBackupManagerworkspaceBackupIdentifier - identifier to workspace backup.asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingRepository(File repositoryBackupSetDir, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingRepository in interface ExtendedBackupManagerrepositoryBackupSetDir - the directory with backup setasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreExistingWorkspace(File workspaceBackupSetDir, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreExistingWorkspace in interface ExtendedBackupManagerworkspaceBackupSetDir - the directory with backup setasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreRepository(File repositoryBackupSetDir, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreRepository in interface ExtendedBackupManagerrepositoryBackupSetDir - the directory with backup setasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredpublic void restoreWorkspace(File workspaceBackupSetDir, boolean asynchronous) throws BackupOperationException, BackupConfigurationException
restoreWorkspace in interface ExtendedBackupManagerworkspaceBackupSetDir - the directory with backup setasynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)BackupOperationException - if backup operation exception occurredBackupConfigurationException - if configuration exception occurredCopyright © 2015 eXo Platform SAS. All Rights Reserved.