Package com.orchestranetworks.addon.dama.ext.backuprestore

Provides the interfaces and classes to perform backup and restore operations on the {addon.label.full} dataset.

  1. Backup the {addon.label.full} dataset:

            //Use BackupRestoreFactory to get an instance of BackupService.
            BackupService backupService = BackupRestoreFactory.getBackupService();
            
            //Create a new instance of BackupSpec with the name of the backup file, folder for the backup file and EBX® session.
            BackupSpec backupSpec = new BackupSpec(aSession, "aFileName", aFolder);
            
            //Backup the {addon.label.full} dataset and return aFile as the backup File.
            File backupFile = backupService.backup(backupSpec);
    
  2. Restore digital assets to a specified location:

            //Use BackupRestoreFactory to get an instance of RestoreService.
            RestoreService restoreService = BackupRestoreFactory.getRestoreService();
            
            //Create a new instance of RestoreSpec with the location of the backup file and EBX® session.
            RestoreSpec restoreSpec = new RestoreSpec(backupFile, aSession);
            
            //Get an instance of RestoreDetail.
            RestoreDetail restoreDetail = restoreService.getRestoreDetails(restoreSpec);
            
            //Get the drive's information and input new drive location.
            List<DriveInformation> driveInformations = restoreDetail.getDriveInformations();
            driveInformations.get(0).setNewLocation("aString");
            
            //Restore the {addon.label.full} dataset with 'restoreDetail'
            //OperationExecutionStatus will be returned as the result of the execution.
            OperationExecutionStatus status = restoreService.restore(restoreDetail);