LoAr
Local Archive & Sync Utility
Safely and efficiently back up multiple development projects scattered across your system into a single backup destination. It selectively targets files excluded by Git (like .gitignore entries, passwords, keys, certificates, and documents) to encrypt and sync them to your custom backup drive. Written in Rust for maximum speed and security.
Key Features
High-Speed Incremental Skip
Compares file size, modification time (mtime), and SHA-256 hash automatically to skip backup copying and encryption for unchanged files. Saves extreme I/O, completing syncs in seconds.
One-Way Sync & Auto Cleanup
Automatically deletes backed-up files from the target drive if they are deleted in the source directory. Cleans up empty folders and leftover metadata (like macOS `.DS_Store`) using a bottom-up Depth-First Search (DFS) algorithm.
AES-256-GCM Encryption
Configure encryption independently per repository. Uses Argon2id for secure key derivation and AES-256-GCM to obfuscate filenames and encrypt all file contents safely.
SQLite Metadata DB
Manages archiving histories and file indexes in an SQLite database file (`loar.db`) located at the target directory root. Automatically runs `VACUUM` to prune and optimize DB file size.
Dual TUI & CLI Modes
Provides an interactive Terminal User Interface (TUI) menu console for easy backup and restore management, alongside a fully non-interactive CLI mode suitable for automated cron jobs.
Configuration Guide
LoAr uses a simple configuration file located at ~/.loar/loar.toml to manage target paths, exclusions, and individual repository settings.
# Destination folder where all backups are stored
target_dir = "/Volumes/Backup/LoAr"
# Global exclude patterns applied to all repositories (Gitignore syntax)
global_exclude = [
".DS_Store",
"node_modules/",
"target/",
"bin/",
"obj/",
".vscode/",
"ephemeral/"
]
# List of repositories to sync
[[repositories]]
name = "MyProject" # Folder name identifier in target_dir
path = "/Users/username/Projects/MyProject" # Source folder path
encrypt = false # Enable or disable encryption
one_way_sync = true # Automatically sync deletions
Usage Commands
Run commands in non-interactive CLI mode for automation, or simply type loar to launch the interactive Terminal UI.
Launches the interactive TUI menu to list repositories, run backup, register new ones, or restore files.
Runs incremental backups for all registered repositories sequentially. Perfect for background scheduling.
Backs up a specific repository. For encrypted repositories, pass --password "pwd" to bypass prompt.
Displays registered repositories, current encryption/sync status, and last backup timestamps.
Registers a new repository via CLI. Add --encrypt to enable encryption, or --no-sync to disable one-way sync.
Restores backed-up files from a specific repository archive to a designated local path.
Safely removes a repository from database indexing and deletes its database history and backed-up files.