3.3. Use replication to recover from data loss
You now have succesfully setup a replication between two zfs appliances (in this lab: between two zpools on the same storage).
This method can be used as a backup method. If your source appliance (in this lab: zpool) somehow breaks or gets eaten by a dinosaur, you still have the data on the target.
Let us simulate such a data loss by simply deleting the source data.
Navigate to shares -> projects. Make sure, that you selected mypool1 in the top left menu.
You should see the default project as well as myproject. Hover your mouse over myproject and click on the trashcan on the right
Confirm the warning by clicking OK and watch all your precious data vanish.
Now, in the upper left menu, select mypool2 and click on replica beneath projects.
You should see zfsapp1: myproject, which is basically the backup of the data, you just deleted.
Click the pen icon on the right and navigate to replication
Notice four icons on the right, starting with the one shaped like a power button. Click the one next to that one shaped like a “+”. If you hover over that icon you can read its caption “Clone most recent snapshot“.
You will be asked for a name of your cloned project. Call it recovery and click continue.
And that’s it.
To see what has been done, navigate to shares -> projects and select mypool2 in the top left.
You will see your new project called recovery. If you go to shares, you will also see your two shares. Notice, how the shares are listed as local, meaning, they are now actually residing on mypool2. Now you can mount the share from the target on any client and you can access your backup.
This method also works, when you only want to restore single files from your backup. Just clone the replicated project on the target appliance, mount the filesystem on any client and recover the lost data.
That’s it for replication between two ZFS Appliances.
In the next lab, we will take a look of an oracle database feature called hybrid holumnar compression.