Package org.opends.server.backup
Class BackupFileManager
java.lang.Object
org.opends.server.backup.BackupFileManager
A backup file manager is responsible for securely and lazily saving backend files and metadata to its underlying
backup storage. Backend files are compressed and encrypted, every file stored in the backup storage is protected for
integrity by an HMAC.
Each file uses a different HMAC and encryption key, each new key is wrapped by the current CryptoManager
master key public key.
Backend files are lazily stored to the underlying backup storage thanks to a fingerprinting algorithm, given the same
file name and same file content, BackupFileManager
will store the file only once.
Stored backend files format
Backend files are compressed with gunzip and encrypted. The wrapped HMAC key, wrapped encryption key, HMAC value at the time of storing the file and file name are stored in a separate ".info" file.Metadata file format
Metadata is stored in ldif files containing the metadata entry, the wrapped HMAC key and the HMAC value at the time of storing the file.-
Method Summary
Modifier and TypeMethodDescriptionReturns the set of metadata IDS found in the underlying backup storage.readBackup
(BackupId backupId) Reads the backup file with the provided ID from the underlying backup storage and converts it to a backup object.
-
Method Details
-
getBackupIds
Returns the set of metadata IDS found in the underlying backup storage.- Returns:
- The set of metadata IDS.
- Throws:
BackupException
- If there is a problem when retrieving the metadata IDs.
-
readBackup
Reads the backup file with the provided ID from the underlying backup storage and converts it to a backup object. Throws an exception if the backup file cannot be found or if it is corrupted.- Parameters:
backupId
- The backup id.- Returns:
- The backup object
- Throws:
BackupException
- If the underlying storage does not contain a backup file with the provided ID, if the backup file integrity cannot be verified or if it is corrupted.
-