Skip to content

feat: Investigate rustic-rs for backup system #1

@H4LFdotDEV

Description

@H4LFdotDEV

Summary

Evaluate rustic-rs as a potential replacement or enhancement to the current backup system.

Current State

The backup system (python/memory_mcp/backup_manager.py) currently supports:

  • LocalBackupStrategy - File-based backups with compression
  • EncryptedBackupManager - ChaCha20-Poly1305 encryption via system keyring
  • Retention policies and integrity verification

Why rustic-rs?

Feature Current rustic-rs
Deduplication ❌ None ✅ Content-defined chunking
Cloud backends ❌ Local only ✅ S3, B2, Azure, GCS, etc.
Incremental backups ⚠️ Full copies ✅ Only changed chunks
Concurrent access ❌ Lock required ✅ Lock-free operations
Encryption ✅ ChaCha20-Poly1305 ✅ AES-256-CTR
Restic compatibility ❌ No ✅ Full repo format support

Potential Benefits

  1. Storage efficiency - Deduplication could reduce backup size 50-80% for typical memory/vault data
  2. Cloud sync - Native support for remote storage backends
  3. Multi-machine - Lock-free design enables concurrent backups from multiple Claude sessions
  4. Ecosystem - Users with existing restic infrastructure get instant integration

Concerns

  • Beta status - rustic acknowledges missing regression tests
  • Binary dependency - Would need to bundle or require separate install
  • Complexity - Current use case (SQLite + Vault files) may not warrant full backup tool

Proposed Implementation

  1. Create RusticBackupStrategy implementing existing BackupStrategy ABC
  2. Optional feature flag: MEMORY_BACKUP_ENGINE=rustic
  3. Fallback to LocalBackupStrategy if rustic unavailable
  4. Migration path from existing backups to rustic repos

When to Prioritize

Consider implementing when users need:

  • Cloud backup support
  • Multi-machine memory sync
  • Large vault archives (100MB+)
  • Restic ecosystem integration

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions