Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Z

zrepl

> 编程语言
Open source

One-stop ZFS backup & replication solution

1.1K stars0 likes1 views
WebsiteGitHub

About

One-stop ZFS backup & replication solution

zrepl

zrepl is a one-stop ZFS backup & replication solution.

User Documentation

User Documentation can be found at zrepl.github.io.

Bug Reports

  1. If the issue is reproducible, enable debug logging, reproduce and capture the log.
  2. Open an issue on GitHub, with logs pasted as GitHub gists / inline.

Feature Requests

  1. Does your feature request require default values / some kind of configuration? If so, think of an expressive configuration example.
  2. Think of at least one use case that generalizes from your concrete application.
  3. Open an issue on GitHub with example conf & use case attached.
  4. Optional: Contact Christian Schwarz for contract work.

The above does not apply if you already implemented everything. Check out the Coding Workflow section below for details.

Development

zrepl is written in Go and uses Go modules to manage dependencies. The documentation is written in ReStructured Text using the Sphinx framework.

Building

Go Code

Dependencies:

  • Go
  • GNU Make
  • Git
  • wget (make generate)
  • unzip (make generate)

Some Go code is generated, and generated code is committed to the source tree. Therefore, building does not require having code generation tools set up. When making changes that require code to be (re-)generated, run make generate. I downloads and installs pinned versions of the code generation tools into ./build/install. There is a CI check that ensures Git state is clean, i.e., code generation has been done by a PR and is deterministic.

Docs

Install uv, then run make docs. uv automatically manages Python and dependencies.

Testing

The test suite is split into pure Go tests (make test-go) and platform tests that interact with ZFS and thus generally require root privileges (sudo make test-platform). Platform tests run on their own pool with the name zreplplatformtest, which is created using the file vdev in /tmp.

For a full code coverage profile, run make test-go COVER=1 && sudo make test-platform && make cover-merge. An HTML report can be generated using make cover-html.

Circle CI

We use CircleCI for automated build & test pre- and post-merge.

There are two workflows:

  • ci runs for every commit / branch / tag pushed to GitHub. It is supposed to run very fast ( build/get_protoc.bash
    • GH releases publish sha256 sums
  • golangci-lint => build/get_golangci_lint.bash
  • bump versions in build/tools.go
    • we use the tools.go trick:
    • go get -tags tools -u example.com/tool ; go mod tidy
    • review whether we're ready to switch to go tool: https://github.com/zrepl/zrepl/pull/909

Now run make generate.

Run make lint and make vet.

Update the CI configuration .circleci/config.yml:

  • Update Go version references (we reference the minimum and max supported version)
  • Set Makefile RELEASE_GOVERSION to the new Go version
  • Update the pinned ZFS release tags in the platformtest matrix (zfs_release parameter) to the latest patch releases of each OpenZFS branch (currently 2.2, 2.3, 2.4)
  • Update the pinned Ubuntu machine image for platformtest (e.g. ubuntu-2404:2025.09.1) — this is pinned rather than current so the ZFS build cache stays valid across runs

Update docs build tooling:

  • Update uv version in .circleci/config.yml (search for astral.sh/uv/ and cache keys containing the version)
  • Check if there's now a CircleCI orb for uv that we could use
  • Update Python version in docs/.python-version

Update docs dependencies (Sphinx, sphinx-rtd-theme):

  • Check current versions in docs/pyproject.toml
  • Review upstream changelogs for breaking changes
  • Update version constraints in pyproject.toml and the uv lockfile (see uv docs on dependencies):
  • Test locally with make docs

Kick a full CI pipeline run (do_ci=true and do_release=true).

Merge PR with merge commit.

Notes to Distro Package Maintainers

  • The Makefile in this project is not suitable for builds in distros.
  • Run the platform tests (Docs -> Usage -> Platform Tests) on a test system to validate that zrepl's abstractions on top of ZFS work with the system ZFS.
  • Ship a default config that adheres to your distro's hier and logging system.
  • Ship a service manager file and please try to upstream it to this repository.
    • dist/systemd contains a Systemd unit template.
  • Ship other material provided in ./dist, e.g. in /usr/share/zrepl/.
  • Have a look at the Makefile's ZREPL_VERSION variable and how it passed to Go's ldFlags. This is how zrepl version knows what version number to show. Your build system should set the ldFlags flags appropriately and add a prefix or suffix that indicates that the given zrepl binary is a distro build, not an official one.
  • Make sure you are informed about new zrepl versions, e.g. by subscribing to GitHub's release RSS feed.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gobackupbookmarkgogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言