ZFS ZREP - zfs back to master

hi,
i testing zfs replication with ZREP.
Host A (MASTER) and Host B (BACKUP).

Host A ( big/jails/test015) sync with Host B ( big2/jails/test015) with no problem.
Host A crash, so on Host B:
zrep takeover -L big/jails/test015
and now Host B is master - ok, work greate.

But when Host A is fixed - what now?
How to restore Master Status for Host A and copy data from Host B?

thanks,
kazix
 
  • Thanks
Reactions: Oko
i testing only this solution - using clear ZFS.
documentation: https://docs.oracle.com/cd/E18752_01/html/819-5461/gbchx.html

On Host B:
create Full backup:
zfs snapshot -r big2/jails/test016@zrep_000013
save this snapshot to file:
zfs send -R big2/jails/test016@zrep_000013 > /home/snap/test016-r
and send this file to Hosta A
scp /home/snap/test016-r Host_A:/home/snap/

On Host A:
remove all data:
zfs destroy -r big/jails/test016
restore all from snapshot:
zfs receive -F -d big < /home/snap/test016-r
and now i have the same data (and snapshot) like one the Host B
and run
zrep takeover big/jails/test016 and zrep -S big/jails/test016
with no problem.

but maybe is faster way, without deleting and restoring all?
 
Back
Top