eXo JCR :: Component :: Extension Service 1.15.0-CR2

org.exoplatform.services.jcr.ext.backup.impl
Class BackupManagerImpl

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl
All Implemented Interfaces:
BackupManager, ExtendedBackupManager, org.picocontainer.Startable

public class BackupManagerImpl
extends Object
implements ExtendedBackupManager, org.picocontainer.Startable

Created by The eXo Platform SAS .

Version:
$Id: $
Author:
Gennady Azarenkov

Field Summary
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.
 
Fields inherited from interface org.exoplatform.services.jcr.ext.backup.BackupManager
FULL_AND_INCREMENTAL, FULL_BACKUP_ONLY
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.exoplatform.services.log.Log LOG

DEFAULT_INCREMENTAL_JOB_PERIOD

public static final String DEFAULT_INCREMENTAL_JOB_PERIOD
Name of default incremental job period parameter in configuration.

See Also:
Constant Field Values

BACKUP_PROPERTIES

public static final String BACKUP_PROPERTIES
Name of backup properties parameter in configuration.

See Also:
Constant Field Values

FULL_BACKUP_TYPE

public static final String FULL_BACKUP_TYPE
Name of full backup type parameter in configuration.

See Also:
Constant Field Values

INCREMENTAL_BACKUP_TYPE

public static final String INCREMENTAL_BACKUP_TYPE
Name of incremental backup type parameter in configuration.

See Also:
Constant Field Values

DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD

public static final String DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD
Default value of incremental job period parameter in configuration.

See Also:
Constant Field Values

DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE

public static final String DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE
Default value of incremental backup type parameter in configuration.


DEFAULT_VALUE_FULL_BACKUP_TYPE

public static final String DEFAULT_VALUE_FULL_BACKUP_TYPE
Default value of incremental backup type parameter in configuration.


BACKUP_DIR

public static final String BACKUP_DIR
Name of backup dir parameter in configuration.

See Also:
Constant Field Values

restoreRepositoryJobs

protected CopyOnWriteArrayList<JobRepositoryRestore> restoreRepositoryJobs
The list of repository restore job.

Constructor Detail

BackupManagerImpl

public BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
                         RepositoryService repoService)
BackupManagerImpl constructor.

Parameters:
initParams - InitParams, the init parameters
repoService - RepositoryService, the repository service

BackupManagerImpl

public BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
                         org.exoplatform.container.xml.InitParams initParams,
                         RepositoryService repoService)
BackupManagerImpl constructor.

Parameters:
initParams - InitParams, the init parameters
repoService - RepositoryService, the repository service

BackupManagerImpl

public BackupManagerImpl(org.exoplatform.container.xml.InitParams initParams,
                         RepositoryService repoService,
                         RegistryService registryService)
BackupManagerImpl constructor. InitParams, the init parameters

Parameters:
repoService - RepositoryService, the repository service
registryService - RegistryService, the registry service

BackupManagerImpl

public BackupManagerImpl(org.exoplatform.container.ExoContainerContext ctx,
                         org.exoplatform.container.xml.InitParams initParams,
                         RepositoryService repoService,
                         RegistryService registryService)
BackupManagerImpl constructor. InitParams, the init parameters

Parameters:
repoService - RepositoryService, the repository service
registryService - RegistryService, the registry service
Method Detail

getCurrentBackups

public Set<BackupChain> getCurrentBackups()
Getting current backups.

Specified by:
getCurrentBackups in interface BackupManager
Returns:
Set return the set of current backups

getMessages

public BackupMessage[] getMessages()
Getting the backup messages.

Specified by:
getMessages in interface BackupManager
Returns:
BackupMessage[] return the backup messages

getBackupsLogs

public BackupChainLog[] getBackupsLogs()
Getting all backup logs .

Specified by:
getBackupsLogs in interface BackupManager
Returns:
BackupChainLog[] return the all backup logs

getRepositoryBackupsLogs

public RepositoryBackupChainLog[] getRepositoryBackupsLogs()
Getting all repository backup logs.

Specified by:
getRepositoryBackupsLogs in interface BackupManager
Returns:
RepositoryBackupChainLog[] return the all repository backup logs

restoreOverInitializer

protected void restoreOverInitializer(BackupChainLog log,
                                      String repositoryName,
                                      WorkspaceEntry workspaceEntry)
                               throws BackupOperationException,
                                      javax.jcr.RepositoryException,
                                      RepositoryConfigurationException,
                                      BackupConfigurationException
Throws:
BackupOperationException
javax.jcr.RepositoryException
RepositoryConfigurationException
BackupConfigurationException

startBackup

public BackupChain startBackup(BackupConfig config)
                        throws BackupOperationException,
                               BackupConfigurationException,
                               javax.jcr.RepositoryException,
                               RepositoryConfigurationException
Starting backup.

Specified by:
startBackup in interface BackupManager
Parameters:
config - BackupConfig, the backup configuration
Returns:
BackupChain return the backup chain
Throws:
BackupOperationException - BackupOperationException will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

stopBackup

public void stopBackup(BackupChain backup)
Stop backup.

Specified by:
stopBackup in interface BackupManager
Parameters:
backup - BackupChain, the backup chain

start

public void start()

Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()

Specified by:
stop in interface org.picocontainer.Startable

findBackup

public BackupChain findBackup(String repository,
                              String workspace)
Finding current backup by repository and workspace.

Specified by:
findBackup in interface BackupManager
Parameters:
repository - String, the repository name
workspace - String, the workspace name
Returns:
BackupChain return the current backup

findBackup

public BackupChain findBackup(String backupId)
Finding current backup by identifier.

Specified by:
findBackup in interface BackupManager
Parameters:
backupId - String the backup identifier
Returns:
BackupChain return the current backup

getBackupDirectory

public File getBackupDirectory()
Getting backup directory.

Specified by:
getBackupDirectory in interface BackupManager
Returns:
File return the backup directory

getFullBackupType

public String getFullBackupType()
Getting full backup type.

Specified by:
getFullBackupType in interface BackupManager
Returns:
Sting return FQN to full backup type

getIncrementalBackupType

public String getIncrementalBackupType()
Getting incremental backup type.

Specified by:
getIncrementalBackupType in interface BackupManager
Returns:
String return FQN to full backup type

getDefaultIncrementalJobPeriod

public long getDefaultIncrementalJobPeriod()
Getting default incremental job period.

Specified by:
getDefaultIncrementalJobPeriod in interface BackupManager
Returns:
long return the default incremental job period

getRestores

public List<JobWorkspaceRestore> getRestores()
Getting list of restores.

Specified by:
getRestores in interface BackupManager
Returns:
List return the list of backups

getLastRestore

public JobWorkspaceRestore getLastRestore(String repositoryName,
                                          String workspaceName)
Getting last restore by repository and workspace name.

Specified by:
getLastRestore in interface BackupManager
Parameters:
repositoryName - String, the repository name
workspaceName - String, the workspace name
Returns:
JobWorkspaceRestore return the job to restore

getLastRepositoryRestore

public JobRepositoryRestore getLastRepositoryRestore(String repositoryName)
Getting last repository restore by repository name.

Specified by:
getLastRepositoryRestore in interface BackupManager
Parameters:
repositoryName - String, the repository name
Returns:
JobWorkspaceRestore return the job to restore

getRepositoryRestores

public List<JobRepositoryRestore> getRepositoryRestores()
Description copied from interface: BackupManager
Getting list of repository restores.

Specified by:
getRepositoryRestores in interface BackupManager
Returns:
List return the list of backups

restore

public void restore(BackupChainLog log,
                    String repositoryName,
                    WorkspaceEntry workspaceEntry,
                    boolean asynchronous)
             throws BackupOperationException,
                    BackupConfigurationException,
                    javax.jcr.RepositoryException,
                    RepositoryConfigurationException
Restore from backup.

Specified by:
restore in interface BackupManager
Parameters:
log - BackupChainLog, the backup log
repositoryName - String, repository name
workspaceEntry - WorkspaceEntry, the workspace entry
asynchronous - boolean, in 'true' then asynchronous restore.
Throws:
BackupOperationException - will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

restore

public void restore(RepositoryBackupChainLog log,
                    RepositoryEntry repositoryEntry,
                    boolean asynchronous)
             throws BackupOperationException,
                    BackupConfigurationException,
                    javax.jcr.RepositoryException,
                    RepositoryConfigurationException
Repository restore from backup.

Specified by:
restore in interface BackupManager
Parameters:
log - RepositoryBackupChainLog, the repository backup log
repositoryEntry - RepositoryEntry, the repository entry
asynchronous - boolean, in 'true' then asynchronous restore.
Throws:
BackupOperationException - will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

restore

public void restore(RepositoryBackupChainLog log,
                    RepositoryEntry repositoryEntry,
                    boolean asynchronous,
                    boolean removeJobOnceOver)
             throws BackupOperationException,
                    BackupConfigurationException,
                    javax.jcr.RepositoryException,
                    RepositoryConfigurationException
Repository restore from backup.

Specified by:
restore in interface BackupManager
Parameters:
log - RepositoryBackupChainLog, the repository backup log
repositoryEntry - RepositoryEntry, the repository entry
asynchronous - boolean, in 'true' then asynchronous restore.
removeJobOnceOver - boolean, in 'true' then restore job well remove after restore.
Throws:
BackupOperationException - will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

restore

public void restore(RepositoryBackupChainLog rblog,
                    RepositoryEntry repositoryEntry,
                    Map<String,String> workspaceNamesCorrespondMap,
                    boolean asynchronous)
             throws BackupOperationException,
                    BackupConfigurationException,
                    javax.jcr.RepositoryException,
                    RepositoryConfigurationException
Repository restore from backup.

Specified by:
restore in interface BackupManager
Parameters:
rblog - RepositoryBackupChainLog, the repository backup log
repositoryEntry - RepositoryEntry, the repository entry
workspaceNamesCorrespondMap - Map, the map with correspondence workspace name in RepositoryEntry and RepositoryBackupChainLog.
asynchronous - boolean, in 'true' then asynchronous restore.
Throws:
BackupOperationException - will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

startBackup

public RepositoryBackupChain startBackup(RepositoryBackupConfig config)
                                  throws BackupOperationException,
                                         BackupConfigurationException,
                                         javax.jcr.RepositoryException,
                                         RepositoryConfigurationException
Starting repository backup.

Specified by:
startBackup in interface BackupManager
Parameters:
config - RepositoryBackupConfig, the backup configuration to repository
Returns:
RepositoryBackupChain return the repository backup chain
Throws:
BackupOperationException - BackupOperationException will be generate the exception BackupOperationException
BackupConfigurationException - will be generate the exception BackupConfigurationException
javax.jcr.RepositoryException - will be generate the exception RepositoryException
RepositoryConfigurationException - will be generate the exception RepositoryConfigurationException

stopBackup

public void stopBackup(RepositoryBackupChain backup)
Stop backup.

Specified by:
stopBackup in interface BackupManager
Parameters:
backup - RepositoryBackupChain, the repositroy backup chain

findRepositoryBackup

public RepositoryBackupChain findRepositoryBackup(String repository)
Finding current backup by repository.

Specified by:
findRepositoryBackup in interface BackupManager
Returns:
RepositoryBackupChain return the current backup to repository

getCurrentRepositoryBackups

public Set<RepositoryBackupChain> getCurrentRepositoryBackups()
Getting current repository backups.

Specified by:
getCurrentRepositoryBackups in interface BackupManager
Returns:
Set return the set of current backups

findRepositoryBackupId

public RepositoryBackupChain findRepositoryBackupId(String backupId)
Finding current backup by id.

Specified by:
findRepositoryBackupId in interface BackupManager
Returns:
RepositoryBackupChain return the current backup to repository

restoreExistingRepository

public void restoreExistingRepository(RepositoryBackupChainLog rblog,
                                      RepositoryEntry repositoryEntry,
                                      boolean asynchronous)
                               throws BackupOperationException,
                                      BackupConfigurationException
Restore existing repository. Previous data will be deleted. For getting status of repository restore can use BackupManager.getLastRestore(String repositoryName) method

Specified by:
restoreExistingRepository in interface ExtendedBackupManager
Parameters:
rblog - repository backup log
repositoryEntry - new repository configuration
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingRepository

public void restoreExistingRepository(String repositoryBackupIdentifier,
                                      RepositoryEntry repositoryEntry,
                                      boolean asynchronous)
                               throws BackupOperationException,
                                      BackupConfigurationException
Restore existing repository. Previous data will be deleted. For getting status of repository restore can use BackupManager.getLastRestore(String repositoryName) method

Specified by:
restoreExistingRepository in interface ExtendedBackupManager
Parameters:
repositoryBackupIdentifier - backup identifier
repositoryEntry - new repository configuration
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingWorkspace

public void restoreExistingWorkspace(BackupChainLog log,
                                     String repositoryName,
                                     WorkspaceEntry workspaceEntry,
                                     boolean asynchronous)
                              throws BackupOperationException,
                                     BackupConfigurationException
Restore existing workspace. Previous data will be deleted. For getting status of workspace restore can use BackupManager.getLastRestore(String repositoryName, String workspaceName) method

Specified by:
restoreExistingWorkspace in interface ExtendedBackupManager
Parameters:
log - workspace backup log
workspaceEntry - new workspace configuration
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingWorkspace

public void restoreExistingWorkspace(String workspaceBackupIdentifier,
                                     String repositoryName,
                                     WorkspaceEntry workspaceEntry,
                                     boolean asynchronous)
                              throws BackupOperationException,
                                     BackupConfigurationException
Restore existing workspace. Previous data will be deleted. For getting status of workspace restore can use BackupManager.getLastRestore(String repositoryName, String workspaceName) method

Specified by:
restoreExistingWorkspace in interface ExtendedBackupManager
Parameters:
workspaceBackupIdentifier - backup identifier
workspaceEntry - new workspace configuration
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingRepository

public void restoreExistingRepository(String repositoryBackupIdentifier,
                                      boolean asynchronous)
                               throws BackupOperationException,
                                      BackupConfigurationException
Restore existing repository. Previous data will be deleted. For getting status of repository restore can use BackupManager.getLastRestore(String repositoryName) method. ReprositoryEntry for restore should be contains in BackupChainLog.

Specified by:
restoreExistingRepository in interface ExtendedBackupManager
Parameters:
repositoryBackupIdentifier - identifier to repository backup.
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingWorkspace

public void restoreExistingWorkspace(String workspaceBackupIdentifier,
                                     boolean asynchronous)
                              throws BackupOperationException,
                                     BackupConfigurationException
Restore existing workspace. Previous data will be deleted. For getting status of workspace restore can use BackupManager.getLastRestore(String repositoryName, String workspaceName) method WorkspaceEntry for restore should be contains in BackupChainLog.

Specified by:
restoreExistingWorkspace in interface ExtendedBackupManager
Parameters:
workspaceBackupIdentifier - identifier to workspace backup.
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreRepository

public void restoreRepository(String repositoryBackupIdentifier,
                              boolean asynchronous)
                       throws BackupOperationException,
                              BackupConfigurationException
ReprositoryEntry for restore should be contains in BackupChainLog.

Specified by:
restoreRepository in interface ExtendedBackupManager
Parameters:
repositoryBackupIdentifier - identifier to repository backup.
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreWorkspace

public void restoreWorkspace(String workspaceBackupIdentifier,
                             boolean asynchronous)
                      throws BackupOperationException,
                             BackupConfigurationException
WorkspaceEntry for restore should be contains in BackupChainLog.

Specified by:
restoreWorkspace in interface ExtendedBackupManager
Parameters:
workspaceBackupIdentifier - identifier to workspace backup.
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingRepository

public void restoreExistingRepository(File repositoryBackupSetDir,
                                      boolean asynchronous)
                               throws BackupOperationException,
                                      BackupConfigurationException
Restore existing repository. Previous data will be deleted. For getting status of repository restore can use BackupManager.getLastRestore(String repositoryName) method. ReprositoryEntry for restore should be contains in BackupChainLog.

Specified by:
restoreExistingRepository in interface ExtendedBackupManager
Parameters:
repositoryBackupSetDir - the directory with backup set
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreExistingWorkspace

public void restoreExistingWorkspace(File workspaceBackupSetDir,
                                     boolean asynchronous)
                              throws BackupOperationException,
                                     BackupConfigurationException
Restore existing workspace. Previous data will be deleted. For getting status of workspace restore can use BackupManager.getLastRestore(String repositoryName, String workspaceName) method WorkspaceEntry for restore should be contains in BackupChainLog.

Specified by:
restoreExistingWorkspace in interface ExtendedBackupManager
Parameters:
workspaceBackupSetDir - the directory with backup set
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreRepository

public void restoreRepository(File repositoryBackupSetDir,
                              boolean asynchronous)
                       throws BackupOperationException,
                              BackupConfigurationException
ReprositoryEntry for restore should be contains in BackupChainLog.

Specified by:
restoreRepository in interface ExtendedBackupManager
Parameters:
repositoryBackupSetDir - the directory with backup set
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

restoreWorkspace

public void restoreWorkspace(File workspaceBackupSetDir,
                             boolean asynchronous)
                      throws BackupOperationException,
                             BackupConfigurationException
WorkspaceEntry for restore should be contains in BackupChainLog.

Specified by:
restoreWorkspace in interface ExtendedBackupManager
Parameters:
workspaceBackupSetDir - the directory with backup set
asynchronous - if 'true' restore will be in asynchronous mode (i.e. in separated thread)
Throws:
BackupOperationException - if backup operation exception occurred
BackupConfigurationException - if configuration exception occurred

eXo JCR :: Component :: Extension Service 1.15.0-CR2

Copyright © 2012 eXo Platform SAS. All Rights Reserved.