Crates.io | hbackup |
lib.rs | hbackup |
version | 0.4.12 |
created_at | 2025-06-11 18:33:16.376808+00 |
updated_at | 2025-08-29 17:46:48.958387+00 |
description | hbackup is a sample, high-performance, cross-platform backup tool written in Rust. It is designed to be fast, efficient, and easy to use, with a focus on performance and reliability. |
homepage | https://github.com/asthetik/hbackup |
repository | https://github.com/asthetik/hbackup |
max_upload_size | |
id | 1708951 |
size | 139,333 |
hbackup is a simple, high-performance, cross-platform backup tool written in Rust. It is designed to be fast, efficient, and easy to use, with a focus on performance, reliability, and flexible backup management.
~
, $HOME
, and relative paths for source and targetgzip
, zip
, sevenz
, zstd
, bzip2
, xz
, lz4
, and tar
for files and directoriescargo install hbackup
bk add ~/my_path1/my_file1.txt ~/back
# Add a job with compression
bk add ~/my_path3/my_dir ~/back -c gzip
bk add ~/my_path4/my_dir ~/back -c zip -l best
bk list
Run all jobs:
bk run
Run multiple jobs by ID:
bk run -i 1
bk run -i 1,2
# or using long form
bk run --id 1,2
Run a one-time backup (without saving as a job):
bk run ~/my_path/myfile.txt ~/back
You can also specify compression for a one-time backup:
bk run ~/my_path/mydir ~/back -c gzip
bk run ~/my_path/mydir ~/back -c zip -l best
Delete multiple jobs by ID:
bk delete 1
bk delete 1,2
Delete all jobs:
bk delete -a
# or using long form
bk delete -all
Update the source and/or target of a job by its ID:
bk edit 1 --source ~/newfile.txt --target ~/newbackup/
Show configuration file path:
bk config
Backup configuration file:
bk config --copy
Reset configuration file (auto-backup before reset):
bk config --reset
Rollback to the last backed up configuration file:
bk config --rollback
You can specify compression format (gzip
, zip
, sevenz
, zstd
, bzip2
īŧ lz4
or tar
) when adding or running jobs:
# Add a job with gzip compression
bk add ~/file.txt ~/back --compression gzip --level fastest
# or a short command line
bk add ~/file.txt ~/back -c gzip -l fastest
# One-time backup with compression
bk run ~/my_path/mydir ~/back -c gzip
gz
, zip
, 7z
, zst
, bzip2
, xz
, lz4
, tar
extensions.Command | Description |
---|---|
bk add |
Add a new backup job |
bk list |
List all backup jobs |
bk run |
Run all jobs, a job by ID, or a one-time backup |
bk delete |
Delete a job by ID or delete all jobs |
bk edit |
Edit a job's source/target by ID |
bk config |
Show, backup, reset, or rollback config file |
Run bk <command> --help
for detailed options.
~/.config/hbackup/config.toml
C:\Users\<User>\AppData\Roaming\hbackup\config.toml
A backup of the config file is automatically created before resetting.
bk
without a command, you'll see:bk requires at least one command to execute. See 'bk --help' for usage.
MIT