org.opends.server.types
Class BackupConfig

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

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

This class defines a data structure for holding configuration information to use when performing a backup of a Directory Server backend. This configuration may specify a full backup (in which the entire contents of the backend repository is to be archived), or incremental (in which only a small set of data containing changes since the last incremental or full backup need be preserved). Note that some backends may not support incremental backups, and those that do may require that incremental backups use the same settings as the full backup with regard to compression, encryption, hashing, signing, etc. Also note that if the incremental backups are supported, 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
BackupConfig(BackupDirectory backupDirectory, java.lang.String backupID, boolean isIncremental)
          Creates a new backup configuration that will create a full or incremental backup of a backend using the provided information.
 
Method Summary
 boolean compressData()
          Indicates whether the backup process should compress the data as it is archived.
 boolean encryptData()
          Indicates whether the backup process should encrypt the data as it is archived.
 BackupDirectory getBackupDirectory()
          Retrieves the backup directory structure for this backup configuration.
 java.lang.String getBackupID()
          Retrieves the identifier associated with this backup configuration, which can be used later to indicate which backup should be restored if multiple backups are stored in the same location.
 java.lang.String getIncrementalBaseID()
          Retrieves the backup ID for the backup on which this incremental backup should be based.
 boolean hashData()
          Indicates whether the backup process should generate a hash of the data as it is archived that may be validated as part of the restore process.
 boolean isIncremental()
          Indicates whether the backend should attempt to perform an incremental backup containing only the changes since the last incremental or full backup.
 void setCompressData(boolean compressData)
          Specifies whether the backup process should compress the data as it is archived.
 void setEncryptData(boolean encryptData)
          Specifies whether the backup process should encrypt the data as it is archived.
 void setHashData(boolean hashData)
          Specifies whether the backup process should generate a hash of the data as it is archived.
 void setIncrementalBaseID(java.lang.String incrementalBaseID)
          Specifies the backup ID for the backup on which this incremental backup should be based.
 void setSignHash(boolean signHash)
          Specifies whether the backup process should digitally sign the hash of the data when it is archived.
 boolean signHash()
          Indicates whether the backup process should digitally sign the hash of the data when it is archived.
 
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

BackupConfig

public BackupConfig(BackupDirectory backupDirectory,
                    java.lang.String backupID,
                    boolean isIncremental)
Creates a new backup configuration that will create a full or incremental backup of a backend using the provided information.

Parameters:
backupDirectory - The backup directory structure that indicates where the files should be written.
backupID - The unique identifier assigned to this backup.
isIncremental - Indicates whether this is to be an incremental or a full backup.
Method Detail

getBackupDirectory

public BackupDirectory getBackupDirectory()
Retrieves the backup directory structure for this backup configuration.

Returns:
The backup directory structure for this backup configuration.

getBackupID

public java.lang.String getBackupID()
Retrieves the identifier associated with this backup configuration, which can be used later to indicate which backup should be restored if multiple backups are stored in the same location.

Returns:
The identifier associated with this backup configuration.

isIncremental

public boolean isIncremental()
Indicates whether the backend should attempt to perform an incremental backup containing only the changes since the last incremental or full backup.

Returns:
true if this should be an incremental backup, or false if it should be a full backup.

getIncrementalBaseID

public java.lang.String getIncrementalBaseID()
Retrieves the backup ID for the backup on which this incremental backup should be based. If it is null, then the backend is free to choose the appropriate existing backup on which to base this incremental backup.

Returns:
The backup ID for the backup on which this incremental backup should be based, or null if none was specified.

setIncrementalBaseID

public void setIncrementalBaseID(java.lang.String incrementalBaseID)
Specifies the backup ID for the backup on which this incremental backup should be based.

Parameters:
incrementalBaseID - The backup ID for the backup on which this incremental backup should be based.

compressData

public boolean compressData()
Indicates whether the backup process should compress the data as it is archived.

Returns:
true if the backup process should compress the data as it is archived, or false if not.

setCompressData

public void setCompressData(boolean compressData)
Specifies whether the backup process should compress the data as it is archived.

Parameters:
compressData - Specifies whether the backup process should compress the data as it is archived.

encryptData

public boolean encryptData()
Indicates whether the backup process should encrypt the data as it is archived.

Returns:
true if the backup process should encrypt the data as it is archived, or false if not.

setEncryptData

public void setEncryptData(boolean encryptData)
Specifies whether the backup process should encrypt the data as it is archived.

Parameters:
encryptData - Specifies whether the backup process should encrypt the data as it is archived.

hashData

public boolean hashData()
Indicates whether the backup process should generate a hash of the data as it is archived that may be validated as part of the restore process.

Returns:
true if the backup process should generate a hash of the data as it is archived, or false if not.

setHashData

public void setHashData(boolean hashData)
Specifies whether the backup process should generate a hash of the data as it is archived.

Parameters:
hashData - Specifies whether the backup process should generate a hash of the data as it is archived.

signHash

public boolean signHash()
Indicates whether the backup process should digitally sign the hash of the data when it is archived. Signing the hash offers a means of protection against tampering by an unauthorized party. Note that this option is only applicable if the backup is to include a hash of the archived data.

Returns:
true if the backup process should digitally sign the generated hash, or false if not.

setSignHash

public void setSignHash(boolean signHash)
Specifies whether the backup process should digitally sign the hash of the data when it is archived.

Parameters:
signHash - Specifies whether the backup process should digitally sign the data when it is archived.