Expand description
Β§Import/export module.
ModulesΒ§
- key_
transfer π - Key transfer via Autocrypt Setup Message.
- transfer π
- Transfer a backup to an other device.
StructsΒ§
- Backup
Provider - Provide or send a backup of this device.
- Progress
Reader π - Reader that emits progress events as bytes are read from it.
- Progress
Writer π - Writer that emits progress events as bytes are written into it.
EnumsΒ§
- Imex
Mode - Import/export command.
ConstantsΒ§
- BLOBS_
BACKUP_ πNAME - DBFILE_
BACKUP_ πNAME
FunctionsΒ§
- adjust_
bcc_ πself - Sets
Config::BccSelf
(andDeleteServerAfter
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 haveBccSelf
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