]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/backup.rs
change catalog format, use dynamic index to store catalog.
[proxmox-backup.git] / src / backup.rs
index 13b9a32fc5724f726ebebc4f34765846adc68ab5..0cb9ad7554a86decfe7310eb747a76f9c87a811b 100644 (file)
@@ -1,15 +1,16 @@
-//! This module implements the proxmox backup chunked data storage
+//! This module implements the proxmox backup data storage
 //!
-//! A chunk is simply defined as binary blob. We store them inside a
-//! `ChunkStore`, addressed by the SHA256 digest of the binary
-//! blob. This technology is also known as content-addressable
-//! storage.
+//! Proxmox backup splits large files into chunks, and stores them
+//! deduplicated using a content addressable storage format.
 //!
-//! We store larger files by splitting them into chunks. The resulting
-//! SHA256 digest list is stored as separate index file. The
-//! `DynamicIndex*` format is able to deal with dynamic chunk sizes,
-//! whereas the `FixedIndex*` format is an optimization to store a
-//! list of equal sized chunks.
+//! A chunk is simply defined as binary blob, which is stored inside a
+//! `ChunkStore`, addressed by the SHA256 digest of the binary blob.
+//!
+//! Index files are used to reconstruct the original file. They
+//! basically contain a list of SHA256 checksums. The `DynamicIndex*`
+//! format is able to deal with dynamic chunk sizes, whereas the
+//! `FixedIndex*` format is an optimization to store a list of equal
+//! sized chunks.
 //!
 //! # ChunkStore Locking
 //!
 //!
 //! Not sure if this is better. TODO
 
+// Note: .pcat1 => Proxmox Catalog Format version 1
+pub const CATALOG_NAME: &str = "catalog.pcat1.didx";
+
+#[macro_export]
+macro_rules! PROXMOX_BACKUP_PROTOCOL_ID_V1 {
+    () =>  { "proxmox-backup-protocol-v1" }
+}
+
+#[macro_export]
+macro_rules! PROXMOX_BACKUP_READER_PROTOCOL_ID_V1 {
+    () =>  { "proxmox-backup-reader-protocol-v1" }
+}
+
+mod file_formats;
+pub use file_formats::*;
+
+mod manifest;
+pub use manifest::*;
+
+mod crypt_config;
+pub use crypt_config::*;
+
+mod key_derivation;
+pub use key_derivation::*;
+
+mod crypt_reader;
+pub use crypt_reader::*;
+
+mod crypt_writer;
+pub use crypt_writer::*;
+
+mod checksum_reader;
+pub use checksum_reader::*;
+
+mod checksum_writer;
+pub use checksum_writer::*;
+
+mod chunker;
+pub use chunker::*;
+
+mod data_blob;
+pub use data_blob::*;
+
+mod data_blob_reader;
+pub use data_blob_reader::*;
+
+mod data_blob_writer;
+pub use data_blob_writer::*;
+
+mod catalog_blob;
+pub use catalog_blob::*;
+
+mod chunk_stream;
+pub use chunk_stream::*;
+
 mod chunk_stat;
 pub use chunk_stat::*;
 
-pub use proxmox_protocol::Chunker;
+mod read_chunk;
+pub use read_chunk::*;
 
 mod chunk_store;
 pub use chunk_store::*;