Interface BackupManager
- All Known Implementing Classes:
DefaultBackupManager
public interface BackupManager
Service to deal with with backups
- Since:
- v2.7
-
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 withbackup(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.
-
Method Details
-
backup
long backup(String exportFileName) throws ExportException, BackupOrRestoreAlreadyInProgressException Perform an XML export of crowd, as well as of the directory configuration.- 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
long backup(String exportFileName, boolean resetDomain) throws ExportException, BackupOrRestoreAlreadyInProgressException Perform an XML export of crowd, as well as of the directory configuration.- 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
-
getBackupFileFullPath
Generate the full path of the given backup filename.- Parameters:
fileName
- a filename- Returns:
- a full path
-
getAutomatedBackupSummary
BackupSummary getAutomatedBackupSummary()Return a summary of how many automated backups are present, and how old are the oldest and most recent backups.- Returns:
- a
BackupSummary
-
generateAutomatedBackupFileName
String generateAutomatedBackupFileName()Generate a filename for an automated backup, that can then be used withbackup(String, boolean)
.- Returns:
- a filename
-