cryptsetup API
Public cryptsetup API
Loading...
Searching...
No Matches
Functions
Device metadata backup

Functions

int crypt_header_backup (struct crypt_device *cd, const char *requested_type, const char *backup_file)
 
int crypt_header_restore (struct crypt_device *cd, const char *requested_type, const char *backup_file)
 

Detailed Description

Function Documentation

◆ crypt_header_backup()

int crypt_header_backup ( struct crypt_device *  cd,
const char *  requested_type,
const char *  backup_file 
)

Backup header and keyslots to file.

Parameters
cdcrypt device handle
requested_typecrypt-type or NULL for all known
backup_filefile to backup header to
Returns
0 on success or negative errno value otherwise.

◆ crypt_header_restore()

int crypt_header_restore ( struct crypt_device *  cd,
const char *  requested_type,
const char *  backup_file 
)

Restore header and keyslots from backup file.

Parameters
cdcrypt device handle
requested_typecrypt-type or NULL for all known
backup_filefile to restore header from
Returns
0 on success or negative errno value otherwise.