Run Sanoid, Syncoid, and Findoid without installing any dependencies.
sanoid-portable is a self-contained, portable build of the Sanoid ZFS snapshot management tool. Built using APPerl (Actually Portable Perl), this self-contained, portable binary encompasses the Perl runtime, all required Perl dependencies, and the Sanoid/Syncoid/Findoid scripts themselves. This enables you to run Sanoid on any Linux or FreeBSD system without needing to install additional Perl dependencies or configure the system's Perl environment.
This is useful if you'd like to use Sanoid on an appliance-like storage system, such as TrueNAS, where standard package installations are restricted or non-ideal.
The following steps will download sanoid-portable, make it executable, transform
(assimilate) it into a native
binary for your system, and set up symbolic links for each tool (sanoid, syncoid, findoid):
wget https://github.com/decoyjoe/sanoid-portable/releases/latest/download/sanoid-portable
chmod +x sanoid-portable
sh ./sanoid-portable --assimilate # Transforms portable into a native binary
ln -s sanoid-portable sanoid
ln -s sanoid-portable syncoid
ln -s sanoid-portable findoidInvoke the symbolic link:
./sanoid --help
./syncoid --help
./findoid --helpNow you just need to configure Sanoid to do what you need it to do. Refer to the Sanoid documentation for configuration instructions.
In WSL you need to disable the WSLInterop binfmt interpreter that's used to launch Windows binaries from Linux:
sudo sh -c 'echo 0 > $(ls /proc/sys/fs/binfmt_misc/WSLInterop*)'Run the initialization script to prepare your environment to build the sanoid-portable executable on a Debian-based system:
./init.shBuild the executable:
./build.shThis script will download and configure APPerl, download necessary Perl modules, and build the portable Sanoid binary.
The executable gets built to output/sanoid-portable.
We stand on the shoulders of giants. Thanks to:
- jimsalterjrs/sanoid for the excellent ZFS snapshot management tool.
- G4Vi/Perl-Dist-APPerl for the tooling to create single-binary portable Perl distributions.
- jart/cosmopolitan for making truly cross-platform portable binaries possible.
The release process is fully automated via GitHub Actions. To release a new version:
- In versions.json, increment the
PackagingRevisionnumber or if updating theSanoidversion then resetPackagingRevisionback to1. - Update the CHANGELOG.md to include release notes for the new version.
- Merge the changes to the mainline branch.
- Create a new GitHub release for the new version and add the release notes.
The GitHub release will trigger a GitHub Actions run which will build the sanoid-portable binary and attach it to the release as an artifact.
This project is licensed under the GPL v3.0 license - see the LICENSE file for details.