Installation

Binary packages

You can download the latest binary package from here or from the GitHub release page.

1.) Download the latest version for Linux amd64: zfs-snap-diff-linux-v1.1.3.tgz

2.) Unpack the archive: tar xvf zfs-snap-diff-linux-v1.1.3.tgz

3.) Run it: ./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>

1.) Download the latest version for FreeBSD amd64: zfs-snap-diff-freebsd-v1.1.3.tgz

2.) Unpack the archive: tar xvf zfs-snap-diff-freebsd-v1.1.3.tgz

3.) Run it: ./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>

You can use pkg install zfs-snap-diff to install it from the package repository.

The new 1.x.x series is currently only in the latest package set.

1.) Download the latest version for macOS amd64: zfs-snap-diff-darwin-v1.1.3.tgz

2.) Unpack the archive: tar xvf zfs-snap-diff-darwin-v1.1.3.tgz

3.) Run it: ./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>

1.) Download the latest version for Solaris amd64: zfs-snap-diff-solaris-v1.1.3.tgz

2.) Unpack the archive: tar xvf zfs-snap-diff-solaris-v1.1.3.tgz

3.) Run it: ./zfs-snap-diff [OPTIONS] <ZFS_DATASET_NAME>

If you use any snapshot management functions, remember to use the -use-sudo flag!
Currently, the tar archive contains only the executables. If you need distribution specific packages, or binaries for any other platform, feel free to contact me.

Build from source

The backend of zfs-snap-diff is implemented in Go, the frontend in PureScript.

go

I use go-bindata to decode the frontend code and all dependencies to a go source file so you only need the go compiler to compile it yourself.

The minimum supported go version is go1.12.

  • clone this repo: git clone --depth 1 https://github.com/j-keck/zfs-snap-diff
  • cd zfs-snap-diff
  • build it: go build -ldflags="-X main.version=$(git describe)" ./cmd/zfs-snap-diff

The optional -ldflags="-X main.version=$(git describe)" flag updates the version string in the binary.

nix

I use nix to build my projects. The nix build also compiles the frontend to javascript and decodes it in pkg/webapp/bindata.go.

  • clone this repo: git clone --depth 1 https://github.com/j-keck/zfs-snap-diff
  • change to the checkout directory: cd zfs-snap-diff
  • build it: nix-build -A zfs-snap-diff

The build artifacts zfs-snap-diff and zsd are in ./result/bin/.

To crosscompile the binary use:

  • FreeBSD: nix-build -A zfs-snap-diff --argstr goos freebsd
  • MacOS: nix-build -A zfs-snap-diff --argstr goos darwin
  • Solaris: nix-build -A zfs-snap-diff --argstr goos solaris