A simple backup replication tool for OpenZFS.
To start using the application, all you need to do is run:
./cantaloupe <backup pool> <label> <datasets> ...
Example:
./cantaloupe backup CHECKPOINT tank/os/main tank/var/log
- The user running this application needs to have permissions to use the
zpool
andzfs
utilities, and needs to have permission to write to the disks you wish to replicate into. If you just want to preview what will happen, you can perform a dry run (-n
) which only requires access to the zfs utilities. - The
zpool
andzfs
utilities need to be in yourPATH
. - You can specify multiple datasets that are located in different pools in your datasets list. However, none of them may be in the same pool as the backup pool.
Cantaloupe uses the same snapshot format as Honeydew:
YYYY-mm-dd-HHMM-ss-LABEL
=> 2022-09-01-1234-56-ANIMALS
The following script will take a snapshot in the correct format:
#!/bin/sh
POOL="tank"
DATE="$(date +%F-%H%M-%S)"
TAG="ANIMALS"
SNAPSHOT_NAME="${DATE}-${TAG}"
zfs snapshot "${POOL}@${SNAPSHOT_NAME}"
Any snapshots that are not in this format will be gracefully skipped.
Usage: cantaloupe [OPTIONS] <BACKUP_POOL> <LABEL> <DATASETS>...
Arguments:
<BACKUP_POOL>
<LABEL>
<DATASETS>...
Options:
-n, --dry-run Performs a dry run. Does not require root privileges.
-h, --help Print help information
-V, --version Print version information
The easiest way to build the project is to have cargo
installed and run:
cargo build --release
.
Released under the Simplified BSD License.
Before opening a PR, please make sure the code is properly formatted and all
tests are passing. You can do this by running: cargo fmt
and
cargo test
respectively.