rBackup is a fast, cross-platform, and multithreaded command-line utility written in Rust for performing incremental
backups of directories. It is inspired by tools like rsync and robocopy, but designed with simplicity, portability,
and localization in mind.
Note: rBackup does not require administrator privileges on any platform.
π View recent changes (Changelog)
β¨ Features
- π Incremental backup β copies only new or modified files
- β‘ Multithreaded β uses all CPU cores to speed up large backups
- π Multilingual support β English and Italian (with auto-detection)
- π¦ Portable β no installation required, single binary
- π§Ύ Optional logging β write backup reports to a file
- π Progress bar β display graphical progress bar during copy process
- π€« Quiet mode β suppress all output for silent operation
π¦ Installation
π§ AUR (Arch Linux)
# or
πΊ Homebrew (macOS/Linux)
π¦ Crates.io (Rust)
π Usage
Note: If
rbackupis executed without any subcommand or positional arguments, the program will print the full help message and exit successfully with status code 0. This behavior is intended so invoking the binary with no arguments acts as a safe help display rather than an error.
β Basic example
π§© Options
Common Options (per-command)
These options are available on most commands:
| Option | Description |
|---|---|
-q, --quiet |
Suppress console output |
-t, --timestamp |
Prepend timestamp to messages |
--log <FILE> |
Write output to a log file |
Global Options
| Option | Description |
|---|---|
-V, --version |
Show version |
-h, --help |
Show help message |
π Commands
Below are the top-level commands with the most relevant options and quick usage notes for each. This layout is easier to scan than a dense table when commands have many options.
copy
Description: Perform an incremental backup from a source directory to a destination directory. Only new or modified
files are copied.
Usage:
Important options:
<source> <destination>β required positional arguments-d,--deltaβ copy only changed/new items (delta mode); skipped items are hidden by default-q,--quietβ suppress console output-t,--timestampβ prepend timestamps to messages--log <FILE>β write output to a log file-x, --exclude <PATTERN>β exclude files matching the given glob pattern (repeatable)--absolute-excludeβ match exclude patterns against absolute source paths--ignore-caseβ perform case-insensitive matching for exclude patterns--dry-runβ perform a dry-run without copying files-j, --jobs <N>β number of worker threads to use (overrides automatic choice)--show-skipped <never|summary|all>β control whether skipped items are printed during the run (default:summary; overrides--deltadefault)
Example:
config
Description: Manage the configuration file (view, initialize or edit).
Usage:
Important options:
--initβ initialize a default configuration file--printβ print the current configuration to stdout--editβ open the configuration in the user's editor--upgradeβ insert new config options into existingrbackup.confwhen missing--editor <EDITOR>β specify the editor to use (overrides$EDITOR/$VISUAL)
Example:
help
Usage:
Description: Print help for a specific command (e.g. rbackup help copy).
π Language Support
rBackup supports multiple languages with automatic system locale detection. The language is configured via the
configuration file (rbackup.conf):
- auto (default) β automatically detect system locale (falls back to English if not supported)
- en β English
- it β Italian
To manage the configuration file:
π Exclude patterns (--exclude)
rbackup copy supports flexible exclude patterns to skip files and directories during a backup. The
--exclude <PATTERN> option can be used multiple times to provide multiple glob patterns.
Where patterns are matched
- By default, patterns are matched against the path relative to the source directory. Example: with source
/home/me/project, patternbuild/**matches/home/me/project/build/foo. - Use
--absolute-excludeto match the pattern against the absolute path of the source file instead. - The matcher also tests the file basename (the filename only). This means a simple pattern like
$RECYCLE.BINorThumbs.dbwill match files whose name equals that string anywhere in the source tree.
Case sensitivity
- By default, matching is case-sensitive.
- Use
--ignore-caseto enable case-insensitive matching for exclude patterns.
Examples
- Exclude macOS DMG files and Thumbs.db files (case-insensitive):
- Exclude the Windows Recycle Bin directory by basename and hidden files starting with a dot:
Tip: In
zsh/bashwrap patterns that contain$or other special characters in single quotes:'$RECYCLE.BIN'.
Absolute vs relative matching
- Relative match (default):
--exclude 'temp/**'will skip anything undersource/temp/. - Absolute match:
--absolute-excludewith--exclude '/home/me/project/temp/**'will match only that absolute path.
Dry-run and logging
- Combine
--dry-runwith--logto generate a report of what would be copied or skipped β but without changing the destination:
- The log file contains both
CopiedandSkippedentries. Skipped entries include the exclude pattern that caused the skip when applicable, which helps debugging complex exclude sets. Skipped files are also printed to the console unless the--quietoption is used.
Use-cases
- Backup only source code files, ignoring build artifacts:
- Mirror a user's Documents folder but exclude large media files and the Recycle Bin:
- Debug why a file is skipped: run a dry-run with logging and inspect the log β each skipped line shows the pattern that caused the skip.
Use cases (CLI & developer)
This section provides concise, copy-pastable examples for common CLI workflows and for managing translations during development.
1) Incremental backup (copy)
- Basic backup:
- Backup with logging, timestamps and quiet off:
- Dry-run to debug excludes and generate a report (Windows
cmd.exe):
rbackup copy C:\source D:\dest --exclude "*.tmp" --dry-run --log dryrun.log
2) Manage configuration
- Initialize a default configuration file:
rbackup config --init
- Edit configuration using the default editor (Windows will use Notepad if $EDITOR not set):
rbackup config --edit
3) Developer: translations workflow (translations_tool)
A small helper script is provided at scripts/translations_tool to validate translations and to generate/apply language
templates.
- Validate all language entries have the same keys (must be run from the repo root):
cd scripts\translations_tool
cargo run -- validate
- Generate a template for a new language
esand print it (prefill with English values):
cd scripts\translations_tool
cargo run -- template es --fill-en
- Apply (insert) a template for
esintoassets/translations.json, creating a timestamped backup, and do not overwrite ifesalready exists:
cd scripts\translations_tool
cargo run -- apply es --fill-en
- Force overwrite an existing language entry (use with caution):
cd scripts\translations_tool
cargo run -- apply es --fill-en --force
Notes:
- The
applycommand creates a backup file underassets/named liketranslations.json.YYYYMMDD_HHMMSS.bakbefore modifyingassets/translations.json. - After applying a template, translate the values in-place with your editor, then run
cargo run -- validateto ensure key consistency.
π Example
π§ͺ Build from source
To compile rBackup yourself:
The compiled binary will be available in target/release/.
Platform-specific requirements
- Windows: The application icon (
assets/rbackup.ico) is automatically embedded during the build via thebuild.rsscript. - macOS/Linux: No additional steps needed; build proceeds with standard Rust toolchain.
Development setup
If you're contributing to the project, ensure you have the required Rust components:
Run validation before submitting a PR:
π§ Maintainers: Manual Release Trigger
If you need to manually build and publish a new release (or rebuild an existing one),
you can trigger the βBuild, Package and Releaseβ workflow directly from GitHub Actions.
πΉ Standard release (safe)
- Go to Actions β Build, Package and Release
- Click Run workflow
- Leave
force_replace=false - Confirm β the workflow will only create the release if it does not already exist.
πΉ Force rebuild of an existing release
- Open the same workflow in Actions
- Click Run workflow
- Set
force_replace=true - Confirm β the workflow will delete the existing GitHub release and tag, then recreate them with the latest artifacts.
π‘ For command-line users: you can also trigger this manually via GitHub CLI:
This ensures you can safely regenerate signed release packages when needed,
without affecting your normal automated release process.
π License
This project is licensed under the MIT License.
Β© 2025 Alessandro Maestri
π‘ Contributing
Pull requests are welcome! If youβd like to add support for more languages, improve performance, or fix bugs, feel free to fork the repo and contribute.