*New 12.3 series Release:
2022-06-07: XigmaNAS released!

We really need "Your" help on XigmaNAS Language packages. Please help us today!

XigmaNAS talks on IRC https://web.libera.chat/#xigmanas, ircs://irc.libera.chat:6697 (TLS) or irc://irc.libera.chat:6667 (plain text)

[HOWTO] Backup with Zrep

Only Admin's or Moderators can move thread's to this sub-forum.
Nobody should start a new thread on this sub-forum.
Anybody can reply to a thread on this sub-forum.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
Site Admin
Site Admin
Posts: 2566
Joined: Dec 13th, '20, 15:18
Location: France - Val d'Oise
Status: Offline

[HOWTO] Backup with Zrep


Post by Ernie »

Hi All,

Here is the How To in order to use zrep in backup mode.

The normal mode allows a source server to send snapshots to another server. It allows to save data. But a no password ssh connection is need between both servers.

In backup mode, source server do nothing. Only the backup server will take the data, only ssh connection is needed from the backup server to the source server (not both sides).

First you need to have installed zrep: https://www.xigmanas.com/forums/viewtopic.php?t=1118
WARNING : Thanks to manage backup of your system and your data before modifications.

For initialization of backup server:
  • The data must be on the backup server (via rsync, via zfs send / receive,....)
  • You use the following command line on backup server via ssh (you need to adapt the path):

Code: Select all

zrep init pool1/films hostnameserveurmaitre pool1/destinationfs
Note: if zrep was already used in normal mode, the metadata must be deleted for each dataset before:

Code: Select all

zrep clear pool1/films
It will not delete your data, only specific information for zrep that you have with normal mode.
  • For each dataset, use the following command (you need to adapt the path)

Code: Select all

zrep failover pool1/films
  • Then for each dataset (you are always on the backup server) :

Code: Select all

zrep refresh pool1/films
The backup server will take the data from source server (and not the source server which pushes the data).

How to recover backup data via zrep for source server ?
  • You identify the datasets that you want to recover
  • You delete metadata for each dataset on backup server (you need to adapt the path)

Code: Select all

zrep clear pool1/films
It doesn't delete the data.
  • You initialize each dataset with zrep (always connected on backup server)

Code: Select all

zrep init pool1/films hostnameserveurmaitre pool1/destinationfs
Backup server will push data on source server.
It is done
NAS 1&2:
XigmaNAS - Ornithopter (revision 9073)
NAS1: rootonzfs, Xeon E3 1241@3.5GHz, 32 Go RAM, 4HDD@8To/mirror+strip, 1SSD cache, 1 UFS 2To (syncthing, rclone)
NAS2: embedded version, i7 CPU 920 @ 2.67GHz, 6Go RAM, 2x3HDD@2To/strip+raidz1, 1SSD cache
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, syncthing, themes, bastille (adguardhome), boot environments, jdupes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode of all datasets), themes)
Post Reply