zfs-replicate

ZFS Snapshot Replicator


Keywords
zfs, replication, backup, remote, snapshots
License
BSD-2-Clause
Install
pip install zfs-replicate==3.2.13

Documentation

zfs-replicate

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

By Alex Brandt alunduil@gmail.com

Description

zfs-replicate sends all ZFS snapshots to a remote host via SSH. zfs-replicate does not create ZFS snapshots.

zfs-replicate is based on autorepl.py used by FreeNAS.

zfs-replicate is related to several other projects which fit other niches:

  1. sanoid: A full snapshot management system. Its companion application, syncoid, handles replication with many available options.
  2. zfs-replicate (BASH): A very similar project. The major differences are configuration style (our project uses parameters whereas this project uses a BASH script), and the system expectations (e.g., logging controls).
  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, modify, 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 CLI 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 CLI 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.