org.opends.server.types
Class RestoreConfig

java.lang.Object
  extended by org.opends.server.types.OperationConfig
      extended by org.opends.server.types.RestoreConfig

@PublicAPI(stability=VOLATILE,
           mayInstantiate=true,
           mayExtend=false,
           mayInvoke=true)
public final class RestoreConfig
extends OperationConfig

This class defines a data structure for holding configuration information to use when restoring a backup of a Directory Server backend. It is assumed that the only information necessary to restore a backup is the path to the directory containing the backup file(s) and the backup ID of the backup to restore. Any other information that may be needed to restore a given backup must be saved in some way by the backup mechanism. Note that if the associated backend supports taking incremental backups, it must be possible to restore the original full backup or any individual incremental backup taken since that full backup (i.e., an incremental backup must not prevent restoring an earlier incremental backup or the original full backup with which the incremental backups are associated).


Constructor Summary
RestoreConfig(BackupDirectory backupDirectory, java.lang.String backupID, boolean verifyOnly)
          Creates a new restore configuration with the provided information.
 
Method Summary
 BackupDirectory getBackupDirectory()
          Retrieves a reference to the directory containing the backup file(s) to restore.
 java.lang.String getBackupID()
          Retrieves the identifier of the backup to be restored.
 boolean verifyOnly()
          Indicates whether the restore process should only attempt to verify the validity and/or integrity of the backup files to the best of its ability rather than actually trying to restore.
 
Methods inherited from class org.opends.server.types.OperationConfig
cancel, isCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestoreConfig

public RestoreConfig(BackupDirectory backupDirectory,
                     java.lang.String backupID,
                     boolean verifyOnly)
Creates a new restore configuration with the provided information.

Parameters:
backupDirectory - The reference to the directory containing the backup file(s) to restore.
backupID - The unique ID assigned to the backup that is to be restored.
verifyOnly - Indicates whether the specified backup should be verified only and not actually restored.
Method Detail

getBackupDirectory

public BackupDirectory getBackupDirectory()
Retrieves a reference to the directory containing the backup file(s) to restore.

Returns:
A reference to the directory containing the backup file(s) to restore.

getBackupID

public java.lang.String getBackupID()
Retrieves the identifier of the backup to be restored. This ID must be unique among all backups (both full and incremental) at least within the specified backup directory.

Returns:
The identifier of the backup to be restored.

verifyOnly

public boolean verifyOnly()
Indicates whether the restore process should only attempt to verify the validity and/or integrity of the backup files to the best of its ability rather than actually trying to restore. Note that in some cases, the ability to verify a backup files will not be able to guarantee that they may be used, but will it must at least verify that the appropriate file(s) exist, that any hashes or signatures are valid, and that any encryption can be decrypted.

Returns:
true if this restore process should only attempt to verify the validity and/or integrity of the backup files, or false if it should actually attempt to restore the backup.