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

crypto
disk_format

Structs

AtomicFileWriter
BundleId

A ZBackup bundle ID

ChunkId

A ZBackup chunk ID

IndexId

A ZBackup index ID

RandomAccess

This struct implements both Seek and Read and can be used to easily and efficiently access the contents of a backup using these idiomatic APIs.

RawIndexEntry

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.

ZBackupRepository

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.

ZBackupRepositoryConfig

This controls the configuration of a repository, and is passed to the open constructor.

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

parse_array_24
random_array_24
run_server
to_array_24

Type Definitions

ChunkData

A ZBackup chunk's data

EncryptionKey

A ZBackup encryption key