engram

Crates.ioengram
lib.rsengram
version2.2.1
created_at2024-11-19 14:14:18.135927+00
updated_at2025-11-20 12:03:38.802711+00
descriptionA fast and space-efficient version control system for portable file backups
homepage
repositoryhttps://gitlab.com/mbednarek360/engram
max_upload_size
id1453311
size187,726
Michael Bednarek (mbednarek360)

documentation

README

engram



Engram is a fast and space-efficient version control system for portable file backups, inspired by git and rsnapshot. It creates snapshots of directories and stores them in a compressed and portable delta-based format.

Engram can be used in a cron job to automatically backup files, and the backup can be stored remotely with a tool like rclone. It will only update internal files when necessary, so modification times can be factored when using rsync-like tools. Engram does not encrypt snapshots, so this should be handled externally if desired.

Unlike other backup tools, engram allows for deletion of any number of previous revisions, as it stores instructions on how to create previous snapshots from the current state. Engram is also heavily optimized for performance, and is capable of processing files at multiple GB/s on modern hardware.

Usage

ℹ️ See engram --help for more detailed information.

Initialize a repository with data:
$ engram init repo

Update a repository with new data:
$ engram update repo

Dump full repository snapshot:
$ engram dump repo ~/out "5days 15hrs"

Pull old data from repository:
$ engram pull repo file.txt "5days 15hrs"

Revert updates to a repository:
$ engram rebase repo "5days 15hrs"

Manually remove old updates:
$ engram clean repo

File Structure

repo/
├── .lock          <-- [in-progress lockfile]
├── base/
│   ├── file1.txt  <-- [current files]
│   └── file2.txt 
├── hashes         <-- [hash table]
└── patches/
    ├── 1736634596 <-- [patch files]
    └── 1736634679

Build Instructions

Cargo (stable):
$ RUSTFLAGS="-C target-cpu=native" cargo install engram

Nix (latest):
$ git clone https://gitlab.com/mbednarek360/engram
$ cd engram; nix build

Current Limitations

  • will not preserve file metadata
  • only supports a UNIX-based OS
Commit count: 421

cargo fmt