Class DefaultBackupRestoreService

    • Method Detail

      • createSpaceBackupJob

        public SpaceBackupJobDetails createSpaceBackupJob​(SpaceBackupSettings settings)
        Description copied from interface: BackupRestoreService
        Creates new space backup job and adds it to the queue. Supports either single-space backup or multi-space backups (depends on how many space ids are provided). Throws an exception if the operation is not permitted. The user should have Space Export permissions to all the spaces passed for backup (or be a sysadmin) to be able to perform this operation.
        Specified by:
        createSpaceBackupJob in interface BackupRestoreService
        Parameters:
        settings - space backup settings
        Returns:
        space backup job details
      • createSiteBackupJob

        public SiteBackupJobDetails createSiteBackupJob​(SiteBackupSettings settings)
        Description copied from interface: BackupRestoreService
        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 should be a sysadmin to be able to perform this operation.
        Specified by:
        createSiteBackupJob in interface BackupRestoreService
        Parameters:
        settings - site backup settings
        Returns:
        site backup job details
      • createSiteRestoreJob

        public SiteRestoreJobDetails createSiteRestoreJob​(SiteRestoreSettings settings)
        Description copied from interface: BackupRestoreService
        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. The user should be a sysadmin to be able to perform this operation.
        Specified by:
        createSiteRestoreJob in interface BackupRestoreService
        Parameters:
        settings - site restore settings
        Returns:
        site restore job details
      • getJob

        public JobDetails getJob​(long jobId)
        Description copied from interface: BackupRestoreService
        Get job by id. The user should be a sysadmin or an owner of the job
        Specified by:
        getJob in interface BackupRestoreService
        Parameters:
        jobId - id of the backup/restore job
        Returns:
        job details
      • findJobs

        public List<JobDetails> findJobs​(JobFilter filter,
                                         int limit)
        Description copied from interface: BackupRestoreService
        Gets backup/restore jobs based on the filter provided.
        Specified by:
        findJobs in interface BackupRestoreService
        Parameters:
        filter - job filter
        limit - amount of jobs that should be returned
        Returns:
        List of backup/restore jobs visible to user based on the filter provided.
      • cancelJob

        public JobDetails cancelJob​(long jobId)
        Description copied from interface: BackupRestoreService
        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. The user should be a sysadmin or an owner of this job to be able to perform this operation.
        Specified by:
        cancelJob in interface BackupRestoreService
        Parameters:
        jobId - id of the backup/restore job
        Returns:
        details of cancelled job
      • cancelAllQueuedJobs

        public int cancelAllQueuedJobs()
        Description copied from interface: BackupRestoreService
        Cancels all queued jobs. Does not affect jobs that are being processed at the moment.
        Specified by:
        cancelAllQueuedJobs in interface BackupRestoreService
        Returns:
        number of cancelled jobs