Module imex

Source
Expand description

Β§Import/export module.

ModulesΒ§

key_transfer πŸ”’
Key transfer via Autocrypt Setup Message.
transfer πŸ”’
Transfer a backup to an other device.

StructsΒ§

BackupProvider
Provide or send a backup of this device.
ProgressReader πŸ”’
Reader that emits progress events as bytes are read from it.
ProgressWriter πŸ”’
Writer that emits progress events as bytes are written into it.

EnumsΒ§

ImexMode
Import/export command.

ConstantsΒ§

BLOBS_BACKUP_NAME πŸ”’
DBFILE_BACKUP_NAME πŸ”’

FunctionsΒ§

adjust_bcc_self πŸ”’
Sets Config::BccSelf (and DeleteServerAfter to β€œnever” in effect) if needed so that new messages are present on the server after a backup restoration or available for all devices in multi-device case. NB: Calling this after a backup import isn’t reliable as we can crash in between, but this is a problem only for old backups, new backups already have BccSelf set if necessary.
check_backup_version πŸ”’
continue_key_transfer
Continue key transfer via Autocrypt Setup Message.
export_backup πŸ”’
Exports the database to a separate file with the given passphrase.
export_backup_stream πŸ”’
Exports the database and blobs into a stream.
export_database πŸ”’
Exports the database to dest, encrypted using passphrase.
export_key_to_asc_file πŸ”’
Returns the exported key file name inside dir.
export_self_keys πŸ”’
get_backup
Contacts a backup provider and receives the backup from it.
get_next_backup_path πŸ”’
Returns Ok((temp_db_path, temp_path, dest_path)) on success. Unencrypted database can be written to temp_db_path. The backup can then be written to temp_path. If the backup succeeded, it can be renamed to dest_path. This guarantees that the backup is complete.
has_backup
Returns the filename of the backup found (otherwise an error)
imex
Import/export things.
imex_inner πŸ”’
import_backup πŸ”’
Imports backup into the currently open database.
import_backup_stream πŸ”’
Imports backup by reading a tar file from a stream.
import_backup_stream_inner πŸ”’
import_secret_key πŸ”’
Imports secret key from a file.
import_self_keys πŸ”’
Imports secret keys from the provided file or directory.
initiate_key_transfer
Initiates key transfer via Autocrypt Setup Message.
set_self_key πŸ”’