Skip to content

alunduil/zfs-replicate

zfs-replicate

https://github.com/alunduil/zfs-replicate

By Alex Brandt alunduil@gmail.com

Description

zfs-replicate sends all Zettabyte File System (ZFS) snapshots to a remote host by SSH. zfs-replicate does not create ZFS snapshots.

zfs-replicate forks autorepl.py used by FreeNAS.

zfs-replicate relates to several other projects, which fit other niches:

  1. sanoid: A full snapshot management system. Its companion, syncoid, handles replication with copious options.
  2. zfs-replicate (BASH): A similar project. The major differences include configuration style and system expectations (for example, logging controls). zfs-replicate uses parameters whereas zfs-replicate (BASH) uses a BASH script.
  3. znapzend: Another scheduling and replicating system.
  4. zrep: A SH script with several control commands for snapshot replication.

Terms of use

You are free to copy, change, and distribute zfs-replicate with attribution under the terms of the BSD-2-Clause licence. See the LICENSE for details.

Prerequisites

  1. A remote system with a ZFS filesystem and the zfs command-line tools
  2. SSH access to that remote system
  3. If you're not using the root user remotely:
    1. Ensure the user can mount filesystems
      1. FreeBSD: sysctl -w vfs.usermount=1
    2. Add ZFS permissions
      1. Command: zfs allow ${USER} ${PERMISSIONS} ${BACKUP_DATASET}
      2. Permissions
        1. clone
        2. create
        3. destroy
        4. hold
        5. mount
        6. promote
        7. quota
        8. readonly
        9. receive
        10. rename
        11. reservation
        12. rollback
        13. send
        14. snapshot
  4. A local ZFS filesystem and zfs command-line tools

N.B., don't use the root user to access your remote system.

How to use zfs-replicate

  1. poetry install
  2. poetry run -- zfs-replicate --help

Documentation

Getting support

  • GitHub issues: Report any problems or features requests to GitHub issues.