Skip to content

brege/ilma-rs

Repository files navigation

ilma

CI License

Multi-source to single-file encrypted archival tool.

Features

Single-File Backups

Use global or per-project configuration with gitignore-dialect excludes to decide what gets archived and encrypted.

Installation

cargo install --git https://github.com/brege/ilma-rs

Usage

  1. ilma --help. All subcommands support --help.

  2. 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

Configuration

ilma works out of the box with sensible defaults, but can be customized extensively.

Global

~/.config/ilma/config.toml

Per-Project

/path/to/project/.ilma.toml

Both 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.


What ilma is and is not

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:

  • Recommended encrypted, deduplicated backups: restic
  • Recommended synchronization tool: syncthing

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.

Other tools

My related projects may be of some historical value or of some present need.

  1. 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.

  2. 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.

License

GPLv3

About

Multi-source to single-file encrypted archival tool

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors

Languages