| Crates.io | merkel_backup_plugin |
| lib.rs | merkel_backup_plugin |
| version | 0.1.0 |
| created_at | 2026-01-16 19:43:53.534702+00 |
| updated_at | 2026-01-16 19:43:53.534702+00 |
| description | Plugins for MerkelBackup |
| homepage | https://github.com/antialize/MerkelBackup/ |
| repository | https://github.com/antialize/MerkelBackup/ |
| max_upload_size | |
| id | 2049155 |
| size | 19,317 |
MerkelBackup is a simple backup solution based on merkel trees. MerkelBackup backups are:
MerkelBackup consists of a server mbackupd and a client mbackup. The client connects to the server over a REST api.
To install the server and client extract the source and run
cargo build --release
cargo install --path . --root /usr
First create a config file in /etc/mbackupd.toml with content like below:
bind = "0.0.0.0:3321"
data_dir = "/var/mbackup"
ssl_cert = "/etc/cert.pxf"
ssl_key = "hunter1"
[[users]]
name = "backup"
password = "hunter2"
access_level = "Put"
[[users]]
name = "recover"
password = "hunter3"
access_level = "Get"
[[users]]
name = "admin"
password = "hunter4"
access_level = "Delete"
Make sure that /etc/cert.pxf is a valid DER-formatted PKCS #12 archive for the host the backup server is running on,
and that ssl_key is the key the certificiate is encrypted with. To generate a .pfx from an openssl certificate run
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem -certfile chain_certs.pem
Also make sure that the /var/mbackup directory exists and is writable by whatever user you want the server to run as.
Finally you can run the backup server as
mbackup -c /etc/mbackupd.toml
Note that the server does not demonize, if you want that create a systemd service file or run the server through docker. Also note that the server uses simple http basic auth, and that the passwords are stored in plain text, so use long auto generated passwords like the output from
sh pwgen -n 30
First create a config file in /etc/mbackup.toml with content like below:
user = "backup"
password = "hunter2"
encryption_key = "MySecretEncryptionKey"
server = "https://backup.example.com"
backup_dirs = [
"/home/importantuser",
"/var/importantdata",
]
cache_db = "/var/cache/mbackup/cache.db"
Make sure that the /var/cache/mbackup/ dir exists and is writable by whatever user the backup client should be run as.
To perform a backup run
mbackup backup
To recover from a backup run
mbackup -c /etc/mbackup.toml --user recover --password hunter3 roots
To get a list of backup roots, find the id of the root you want to restore from (say 42) and run
mbackup -c /etc/mbackup.toml --user recover --password hunter3 restore 42 -p /home/importantuser/mydir
To remove old backups and free up space run
mbackup -c /etc/mbackup.toml --user admin --password hunter4 prune --age 90
This will remove all backups older than 90 days.
To validate the integrety of the backedup date run
mbackup -c /etc/mbackup.toml --user recover --password hunter3 validate --full
This software has has not been tested extensively so use it at your own peril.