local ZFS Replication to external drive - scripted

Status
Not open for further replies.

reqlez

Explorer
Joined
Mar 15, 2014
Messages
84
Hi.

I have been googling for hours and i cannot really find any information, just bits and pieces that i cannot seem to assemble in my head.

So i understand that you can set the replication target in the GUI as your local machine and it works, good.

But here comes the question ... how do you automatically export / import the external drive being used as the replication "target" after autorepl.py completed the replication ?

How about ... can i use 2 different drives in rotation and will replication still work or will i get an error saying the snapshots on the destination drive are out of date or something when i insert the second drive on another day ?

i'm assuming i can just edit autorepl.py script and enter in an import command ... and then enter an export command after the replication is complete ... but i do not know what commands to use and the procedure. Basically ... i do NOT want to go into the gui every time to use the Autoimport feature... i want this to be done automagically before replication starts.

If for any reason the drive rotation doesn't work with ZFS replication because of how the replication system works, i would like to use some kind of cron rsync task, but again ... how do i automagically mount the volume when the script starts ( i'm going to insert the drive at "6PM" for example ... and i want the script to run at "10PM" and mount the drive, then in the morning i will simply remove the drive since the script already dismounted it safely.

Any ideas ?
 
Status
Not open for further replies.
Top