Replicating pool and then restoring it

Status
Not open for further replies.
Joined
Jun 20, 2016
Messages
22
I have have the following scenario.

I have pool1 and pool2. Both with different datasets and zvols.
I want to clone everything from pool2 to a dataset on pool1. Lets say pool1/temppool2clone

Then I will destroy pool2 recreate it with another set of disks, and restore everything from pool1/temppool2clone back to pool2

I am reading different commands for zfs send and recv, but it's confusing. I tried and it did not work
For example i tried with random pool2 snapshot to copy it to pool1
zfs send -R pool2/randomdataset@test | zfs receive -F pool1/temppool2clone

and i got cannot receive: local origin for clone pool2/randomdataset@test does not exist
What I'm doing wrong and what i the best approach to achieve my goal?

P.S. It will be great in the new replication system to be a way to tell freenas "clone x into y" without all the hassle that is required now.
 
D

dlavigne

Guest
Which build version (from System -> Information) are you using?
 
Joined
Jun 20, 2016
Messages
22
FreeNAS-9.10.2 (a476f16)
I got it working by
zfs send -vp pool2/randomdataset@test | zfs receive -dv pool1/temppool2clone
I guess that is because I'm trying with a single dataset, without any recursive shapshots. The final goal is to copy the entire pool, but i wanted to test with 1 dataset only.
Problem is i can't find a good place to read about zfs parameters for send or recv. I mean well explained and with examples. Everything that i find is poorly written, which only adds confusion.
 
Status
Not open for further replies.
Top