High-performance incremental backup tool for LTO tape using Git-inspired content-addressable storage.
- ✅ Configuration Management: TOML-based configuration file support
- ✅ SMB Credential Management: Username/password authentication for Samba shares
- ✅ Password Obfuscation: Base64 encoding for password protection in config files
- ✅ Incremental Backup: Content-based deduplication using file hashes
- ✅ redb Metadata Storage: Embedded database for backup metadata
- ✅ Git-like Mechanism: Content-Addressable Storage (CAS) + Merkle Tree
- ✅ Streaming Backup: Zero-temp-file streaming to tape via PowerShell pipes
- ✅ LTFS Integration: Integration with rustltfs for real tape writing
Copy the example configuration and edit:
copy config.example.toml config.tomlEdit config.toml with your settings:
[source]
url = "\\\\server\\share\\path"
username = "your_username"
password = "your_password" # or use base64 encoding
excludes = ["**/*.tmp", "**/*.cache"] # Glob patterns to exclude
[target]
output_mode = "stream" # "stream" or "tar"
tar_path = "backup_%Y%m%d.tar" # Only used if output_mode = "tar"
db_path = "rumba.db"
[tape]
device = "\\\\.\\TAPE0" # Windows: \\.\TAPE0, Linux: /dev/sg0
rumba_path = "rumba.exe"
rustltfs_path = "rustltfs.exe"
skip_database = falseTo avoid storing passwords in plain text:
cargo run --bin rumba -- encode-password "your_password"Copy the base64:xxx output to the password field in config.
Rumba uses a two-stage backup process for maximum efficiency:
Scans the source directory, computes hashes (in parallel), updates the database, and identifies new/modified files.
# This will scan files and output the number of files needing backup
rumba backup --config config.toml --checkReads the backup plan from the database and streams the data to tape. This step is instant (no re-scanning).
# Streaming to tape via rustltfs
.\scripts\backup-incremental.ps1 -ConfigFile config.tomlOr manually:
rumba backup --config config.toml --output - | rustltfs write ...Use the db-inspect tool to view backup metadata:
# Show statistics
cargo run --bin db-inspect -- stats
# List all blobs
cargo run --bin db-inspect -- list-blobs
# List index entries
cargo run --bin db-inspect -- list-indexRumba borrows from Git's internal mechanisms, designed for massive file backups:
-
Content-Addressable Storage (CAS):
- Files are stored by content hash (BLAKE3), not filename
- Automatic deduplication: Identical content stored only once
- Data integrity: Hash serves as checksum, preventing silent corruption
-
Efficient Incremental Backup:
- Level 1 - Quick Check: Compare file
mtimeandsize(like Git Index) - Level 2 - Content Check: If metadata changed, compute content hash and check
blobstable - Level 3 - Data Write: Only new content blocks are written to tape
- Level 1 - Quick Check: Compare file
-
Metadata Separation:
- File content streamed to tape (linear storage, optimal for LTO)
- File metadata (names, permissions, directory structure) in fast local KV database (redb)
graph TD
subgraph Phase 1: Check & Plan
Source[SMB Share] -->|Parallel scan| Scanner(Scanner)
Scanner -->|Sorted directory stream| Pipeline{Pipeline}
Pipeline -->|1. Check mtime/size| IndexCheck{Index Check}
IndexCheck -->|Changed| Hasher[Compute BLAKE3]
Hasher -->|2. Check content hash| DedupCheck{Dedup Check}
DedupCheck -->|New hash| MarkDB[Mark 'needs_backup' in DB]
IndexCheck -->|Unchanged| Skip[Skip]
end
subgraph Phase 2: Execute Backup
DB[(Redb Metadata DB)] -->|Query 'needs_backup'| BackupExec[Backup Executor]
BackupExec -->|Stream content| TapeWriter(Tape Writer)
TapeWriter -->|Stream tar| Output[Output: rustltfs / tar]
TapeWriter -.->|Clear 'needs_backup'| DB
end
MarkDB --> DB
Assuming rumba.exe and db-inspect.exe are in your PATH:
- Check/Scan (Plan):
rumba backup --check
- Backup to Tape (Stream):
rumba backup --output - | rustltfs write --tape \\.\TAPE0 ...
- Backup to File:
rumba backup --output backup.tar
- Encode Password:
rumba encode-password "mypassword"
- Show Database Stats:
db-inspect stats
- List All Indexed Files:
db-inspect list-index
- Show Specific File Info:
db-inspect show-index "\\server\share\file.txt" - List Deduplicated Blobs:
db-inspect list-blobs
Rumba supports zero-temp-file streaming for optimal performance:
# Rumba generates tar → PowerShell pipe → rustltfs writes to tape
rumba backup --config config.toml --output - | `
rustltfs write --device \\.\TAPE0 --destination /incremental_20251125/backup.tarBenefits:
- ✅ Zero temporary files
- ✅ Reduced disk I/O by 66%
- ✅ Real-time streaming
- ✅ Memory-efficient
See scripts/README.md for detailed usage.
Rumba/
├── src/
│ ├── main.rs # Main entry point
│ ├── lib.rs # Library interface
│ ├── config.rs # Configuration management
│ ├── models.rs # Data structure definitions
│ ├── db.rs # redb database operations
│ ├── scanner.rs # File scanner
│ ├── pipeline.rs # Backup pipeline
│ ├── diff.rs # Diff engine
│ ├── tape.rs # Tape writer
│ └── bin/
│ └── db_inspect.rs # Database inspection tool
├── scripts/
│ ├── backup-incremental.ps1 # Streaming incremental backup script
├── config.example.toml # Configuration example
└── Cargo.toml
url: SMB share path (Windows UNC format)username: SMB usernamepassword: SMB password (plain text or base64 encoded)excludes: List of glob patterns to exclude from backup (e.g.,["**/*.tmp", "**/Thumbs.db"])
output_mode: Output mode, either"stream"(for piping to tape) or"tar"(for writing to file)tar_path: Path to tar file (only used whenoutput_mode = "tar"). Supportsstrftimeformatting (e.g.,%Y%m%d_%H%M%S)db_path: Path to metadata database
parallel_threads: Number of parallel scanning threads (default: CPU cores)compression_level: Zstd compression level 0-22 (default: 3)
device: Tape device path (Windows:\\.\TAPE0, Linux:/dev/sg0)rumba_path: Path to rumba executable (default:rumba.exe)rustltfs_path: Path to rustltfs executable (default:rustltfs.exe)skip_database: Boolean to skip database backup in streaming mode
- Base64 encoding provides obfuscation, not encryption
- Not recommended for production use
- Consider using:
- Windows Credential Manager API
- Runtime password prompts
- Environment variables
- Language: Rust 2021 Edition
- Database: redb (embedded KV store)
- Serialization: rkyv (zero-copy)
- Hashing: BLAKE3 (SIMD-accelerated)
- Scanning: jwalk (parallel traversal)
- Configuration: TOML + serde
- CLI: clap