Multi-source to single-file encrypted archival tool.
Single-File Backups
Use global or per-project configuration with gitignore-dialect excludes to decide what gets archived and encrypted.
cargo install --git https://github.com/brege/ilma-rs-
ilma --help. All subcommands support--help. -
Immediate Backup
By default, ilma will backup the current directory and store a copy as a sibling.
cd my-project ilma pack .
ls -1 ..
my-project my-project.tar.zst
Note
Compression Algorithms
The compression library used in this project is Zstandard (zstd). This is a personal choice, which I use because of good performance on Btrfs filesystems. Zstandard is also the algorithm restic uses. While zstd is not yet as widely supported across all platforms as gzip, bzip2, or xz (in that order), it is available on most modern Linux systems.
Sources: compression, speed, usage
ilma works out of the box with sensible defaults, but can be customized extensively.
~/.config/ilma/config.toml/path/to/project/.ilma.tomlBoth files accept the same keys. Later layers replace earlier values field by field. Command-line --level and --recipient values replace the resolved fields, while each --exclude appends a pattern.
| Key | Type | Default | Layers |
|---|---|---|---|
pack.level |
integer | 3 |
global, project, CLI |
pack.excludes |
array of strings | [] |
global, project, CLI (appends) |
pack.output_dir |
path | unset (sibling of first input) | global, project |
pack.naming |
timestamp, numbered, or overwrite |
timestamp |
global, project |
pack.recipient |
string | unset (plain archive) | global, project, CLI |
extract.target_dir |
path | unset (current directory) | global, project |
Relative directory values are anchored to the project root. A leading ~ expands from HOME.
At any time, you can run
ilma config [PROJECT_PATH]to see the resolved configuration for a given project / target.
ilma simplifies the steps to make single-file backups with or without configuration. It is meant to create local snapshots that can be archived, encrypted, moved, and recovered without needing a custom repository format.
ilma is NOT intended to be a deduplication or synchronization tool. These tools offer better coverage for those tasks:
Because ilma outputs to tar.zst{.gpg}, ilma-generated files are recoverable without needing ilma itself. Restic requires restic for recovery. Syncthing is synchronous, and opaque in the only place you get encryption: "untrusted device" mode.
ilma works in addition to restic and syncthing for a complementary purpose. Restic efficiently backs up entire home directories with deduplication and versioning. Syncthing maintains synchronized state across devices. ilma can be used to create encrypted project snapshots for transport to untrusted storage.
ilma can be used in combination or in addition to restic and syncthing. For example: android phones have small file count limits, so pure syncs of server material become impractical.
My related projects may be of some historical value or of some present need.
-
I made sak, which is built on a small fork of rustic-core, the basis of which is a Rust implementation of Restic, to get Restic-in-reverse: pulling snapshots from multiple Linux machines / SSH servers.
-
Then dil, ported from ilma's former and outgrown bash-based implementation, detects and cleans project build litter:
node_modules,__pycache__, LaTeX cruft (*.aux,*.synctex.gz), and equivalents across many languages and frameworks. May be useful to run before a backup to avoid archiving forgettable, reproducible junk.