45Drives Knowledge Base
KB450302 - Recovering ZFS Pool From Backup
https://knowledgebase.45drives.com/kb/kb450302-recovering-zfs-pool-from-backup/

KB450302 - Recovering ZFS Pool From Backup

Posted on April 19, 2021 by Brett Kelly


Scope/Description

This article will walk through the process of recovering a ZFS storage pool from a backup and re-enabling replication task afterwards

Scenario:

Prerequisites

Steps

Disable Znapzend on Primary Server

 

Recovering Snapshot on Backup Server

ssh-keygen (You'll be prompted with 3 questions, just press enter on all 3 until you're returned to the command prompt)
ssh-copy-id root@primary (You will be asked if you want to continue connecting, say "yes" and then enter the root password.)
zfs send esxitank/backup@2021-04-19-120000 | mbuffer -s 128k -m 2G | ssh 192.168.123.121 zfs recv tank/storage
# zfs send esxitank/backup@2021-04-19-120000 | mbuffer -s 128k -m 2G | ssh 192.168.123.121 zfs recv tank/storage
in @ 112 MiB/s, out @ 112 MiB/s, 8994 MiB total, buffer 100% full

Restarting Snapshot Replication on Primary Server

znapzendzetup import --write tank/storage znapzend-tank-storage.backup
znapzendzetup create --recursive --mbuffer=/usr/bin/mbuffer --mbuffersize=5G SRC '7d=>1h' tank/storage DST:a '7d=>1h' root@192.168.185.10:esxitank/backup

Verification

Troubleshooting