Package org.opends.server.types
Class BackupConfig
- java.lang.Object
-
- org.opends.server.types.OperationConfig
-
- 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
Constructors Constructor Description BackupConfig(BackupDirectory backupDirectory, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompressData()Indicates whether the backup process should compress the data as it is archived.booleanencryptData()Indicates whether the backup process should encrypt the data as it is archived.BackupDirectorygetBackupDirectory()Retrieves the backup directory structure for this backup configuration.StringgetBackupID()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.StringgetIncrementalBaseID()Retrieves the backup ID for the backup on which this incremental backup should be based.booleanhashData()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.booleanisIncremental()Indicates whether the backend should attempt to perform an incremental backup containing only the changes since the last incremental or full backup.voidsetCompressData(boolean compressData)Specifies whether the backup process should compress the data as it is archived.voidsetEncryptData(boolean encryptData)Specifies whether the backup process should encrypt the data as it is archived.voidsetHashData(boolean hashData)Specifies whether the backup process should generate a hash of the data as it is archived.voidsetIncrementalBaseID(String incrementalBaseID)Specifies the backup ID for the backup on which this incremental backup should be based.voidsetSignHash(boolean signHash)Specifies whether the backup process should digitally sign the hash of the data when it is archived.booleansignHash()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
-
-
-
-
Constructor Detail
-
BackupConfig
public BackupConfig(BackupDirectory backupDirectory, 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 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:
trueif this should be an incremental backup, orfalseif it should be a full backup.
-
getIncrementalBaseID
public String getIncrementalBaseID()
Retrieves the backup ID for the backup on which this incremental backup should be based. If it isnull, 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
nullif none was specified.
-
setIncrementalBaseID
public void setIncrementalBaseID(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:
trueif the backup process should compress the data as it is archived, orfalseif 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:
trueif the backup process should encrypt the data as it is archived, orfalseif 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:
trueif the backup process should generate a hash of the data as it is archived, orfalseif 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:
trueif the backup process should digitally sign the generated hash, orfalseif 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.
-
-