Interface BackupRestoreManager
-
- All Known Implementing Classes:
ConfluenceBackupRestoreManager
@ExperimentalApi public interface BackupRestoreManager
Responsible for accepting backup/restore operations, checking permissions, managing the queue and cluster-wide locks. All operations are asynchronous.- Since:
- 7.17.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
cancelAllJobsFromQueue()
Cancels all queued jobs.BackupRestoreJob
cancelJob(Long jobId)
Cancels the job.Collection<BackupRestoreJob>
findJobs(BackupRestoreJobsSearchFilter backupRestoreJobsSearchFilter, int limit)
Returns jobs based on the filter provided.BackupRestoreJob
getJob(Long id)
Get job by id.BackupRestoreJob
startSiteBackup(BackupRestoreSettings siteBackupSettings)
Starts the new site backup job if possible.BackupRestoreJob
startSiteRestore(BackupRestoreSettings siteRestoreSettings)
Starts the new site restore job if possible.BackupRestoreJob
startSpaceBackup(BackupRestoreSettings spaceBackupSettings)
Adds the new space backup job to the queue.BackupRestoreJob
startSpaceRestore(BackupRestoreSettings spaceRestoreSettings)
Adds the new space restore job to the queue.
-
-
-
Method Detail
-
getJob
BackupRestoreJob getJob(Long id)
Get job by id.
-
startSpaceBackup
BackupRestoreJob startSpaceBackup(BackupRestoreSettings spaceBackupSettings) throws BackupRestoreException
Adds the new space backup job to the queue. Throws an exception if the operation is not permitted. Support either single-space backup ot multi-space backups (depends on how many space ids are provided).- Parameters:
spaceBackupSettings
- space backup settings- Throws:
BackupRestoreException
-
startSiteBackup
BackupRestoreJob startSiteBackup(BackupRestoreSettings siteBackupSettings) throws BackupRestoreException
Starts the new site backup job if possible. If another site backup/restore job is in progress, the operation will be rejected because the existing site backup must be either cancelled or finished first. Throws an exception if the operation is not permitted. The user has to the a sysadmin to perform this operation.- Parameters:
siteBackupSettings
- site backup settings- Throws:
BackupRestoreException
-
startSpaceRestore
BackupRestoreJob startSpaceRestore(BackupRestoreSettings spaceRestoreSettings) throws BackupRestoreException
Adds the new space restore job to the queue. Throws an exception if the operation is not permitted. The user has to the a sysadmin to perform this operation.- Parameters:
spaceRestoreSettings
- space restore settings- Throws:
BackupRestoreException
-
startSiteRestore
BackupRestoreJob startSiteRestore(BackupRestoreSettings siteRestoreSettings) throws BackupRestoreException
Starts the new site restore job if possible. If another site backup/restore job is in progress, the operation will be rejected because the existing site backup must be either cancelled or finished first. Throws an exception if the operation is not permitted.- Parameters:
siteRestoreSettings
- site restore settings- Throws:
BackupRestoreException
-
cancelJob
BackupRestoreJob cancelJob(Long jobId) throws BackupRestoreException
Cancels the job. If the job is already cancelled or failed, the method will do nothing. Throws an exception if the operation is not permitted.- Parameters:
jobId
- jobId- Returns:
- the job
- Throws:
BackupRestoreException
-
cancelAllJobsFromQueue
int cancelAllJobsFromQueue() throws BackupRestoreException
Cancels all queued jobs. Does not affect jobs that are being processed at this moment.- Returns:
- number of cancelled jobs.
- Throws:
BackupRestoreException
-
findJobs
Collection<BackupRestoreJob> findJobs(BackupRestoreJobsSearchFilter backupRestoreJobsSearchFilter, int limit) throws BackupRestoreException
Returns jobs based on the filter provided. Permissions depend on the filter.- Throws:
BackupRestoreException
-
-