Crate rzbackup [−] [src]
RZBackup is a library, and a collection of binaries, implementing a partial clone of ZBackup.
The main class is Repository
, which has static methods for opening and
accessing data from a ZBackup repository. The restore
method will restore
a backup to a provided Writer
.
Repository
implements Clone
and is fully thread-safe. It performs
parallel decompression operations using a background thread pool and it has
a three-layer cache. The parameters for cache sizes and number of threads
are fully configurable.
There is also a RandomAccess
class which implements Seek
and Read
, and
can be constructed from a Repository
and the name of a backup.
Modules
read | |
write |
Structs
CryptoReader |
This provides a reader for an encrypted ZBackup file. It is used internally, but also made available publicly, since it may be useful in some cases. |
CryptoWriter | |
RandomAccess |
This struct implements both |
Repository |
This is the main struct which implements the ZBackup restore functionality. It is multi-threaded, using a cpu pool internally, and it is fully thread safe. |
RepositoryConfig |
This controls the configuration of a repository, and is passed to the |
TempFileManager |
Constants
AUTHOR | |
BUFFER_SIZE |
The size of the buffers used when reading and decompressing ZBackup data |
FILESYSTEM_CACHE_PATH |
The default location for the filesystem cache. |
HMAC_SIZE |
The size of a ZBackup HMAC, in bytes |
IV_SIZE |
The size of a ZBackup initialisation vector, in bytes |
KEY_SIZE |
The size of a ZBackup encryption key, in bytes |
MAX_COMPRESSED_FILESYSTEM_CACHE_ENTRIES |
The default number of compressed filesystem cache entries. This number of chunks will be stored in a temporary directory after LZO-compression. |
MAX_COMPRESSED_MEMORY_CACHE_ENTRIES |
The default number of uncompressed memory cache entries. This number of chunks will be kept in memory after LZO-compression, in an LRU cache. |
MAX_UNCOMPRESSED_MEMORY_CACHE_ENTRIES |
The default number of uncompressed memory cache entries. This number of chunks will be kept in memory uncompressed, in an LRU cache. |
VERSION |
Functions
bundle_id_generate | |
bundle_id_parse | |
chunk_id_generate | |
chunk_id_parse | |
index_id_generate | |
index_id_parse | |
run_server |
Type Definitions
BundleId |
A ZBackup bundle ID |
ChunkData |
A ZBackup chunk's data |
ChunkId |
A ZBackup chunk ID |
EncryptionKey |
A ZBackup encryption key |
IndexEntry |
A ZBackup index entry. This combined the header with the bundle info, since generally both of these are needed to make use of the data. |
IndexId |
A ZBackup index ID |