Class DefaultBackupManager
java.lang.Object
com.atlassian.crowd.manager.backup.DefaultBackupManager
- All Implemented Interfaces:
BackupManager
Default implementation of
BackupManager
- Since:
- v2.7
-
Constructor Summary
ConstructorDescriptionDefaultBackupManager
(XmlMigrationManager xmlMigrationManager, BackupFileStore backupFileStore, PropertyManager propertyManager) -
Method Summary
Modifier and TypeMethodDescriptionlong
Perform an XML export of crowd, as well as of the directory configuration.long
Perform an XML export of crowd, as well as of the directory configuration.Generate a filename for an automated backup, that can then be used withBackupManager.backup(String, boolean)
.Return a summary of how many automated backups are present, and how old are the oldest and most recent backups.getBackupFileFullPath
(String fileName) Generate the full path of the given backup filename.
-
Constructor Details
-
DefaultBackupManager
public DefaultBackupManager(XmlMigrationManager xmlMigrationManager, BackupFileStore backupFileStore, PropertyManager propertyManager)
-
-
Method Details
-
generateAutomatedBackupFileName
Description copied from interface:BackupManager
Generate a filename for an automated backup, that can then be used withBackupManager.backup(String, boolean)
.- Specified by:
generateAutomatedBackupFileName
in interfaceBackupManager
- Returns:
- a filename
-
getBackupFileFullPath
Description copied from interface:BackupManager
Generate the full path of the given backup filename.- Specified by:
getBackupFileFullPath
in interfaceBackupManager
- Parameters:
fileName
- a filename- Returns:
- a full path
-
backup
public long backup(String exportFileName) throws ExportException, BackupOrRestoreAlreadyInProgressException Description copied from interface:BackupManager
Perform an XML export of crowd, as well as of the directory configuration.- Specified by:
backup
in interfaceBackupManager
- Parameters:
exportFileName
- the name of the file to export to (not the full path)- Returns:
- the time it took to execute the export, in milliseconds
- Throws:
ExportException
- in case an error happens while exporting the dataBackupOrRestoreAlreadyInProgressException
- in case a backup or a restore is already in progress
-
backup
@Transactional public long backup(String exportFileName, boolean resetDomain) throws ExportException, BackupOrRestoreAlreadyInProgressException Description copied from interface:BackupManager
Perform an XML export of crowd, as well as of the directory configuration.- Specified by:
backup
in interfaceBackupManager
- Parameters:
exportFileName
- the name of the file to export to (not the full path)resetDomain
- whether to activate the RESET_DOMAIN option or not- Returns:
- the time it took to execute the export, in milliseconds
- Throws:
ExportException
- in case an error happens while exporting the dataBackupOrRestoreAlreadyInProgressException
- in case a backup or a restore is already in progress
-
getAutomatedBackupSummary
Description copied from interface:BackupManager
Return a summary of how many automated backups are present, and how old are the oldest and most recent backups.- Specified by:
getAutomatedBackupSummary
in interfaceBackupManager
- Returns:
- a
BackupSummary
-