SOLVED How ZFS replication works on FreeNAS

Status
Not open for further replies.

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
I am trying to understand how ZFS replication works on FreeNAS 9.2.1.9 (possibly it is the same as 9.3). My conclusion from reading the user manual is that FreeNAS uses vanilla zfs send command possibly with few switches and schedules it as a cron job. Apparently it does that in semi-incremental backup. I am the most curios how taking snapshot triggers replication and how old replications gets deleted. However login into the shell and lunching crontab -e reveals that root crontab. Where should I look for the info (crontab file)? on the live installation. Can anybody help me located relevant code in the source

https://github.com/freenas/freenas
 

Fei

Explorer
Joined
Jan 13, 2014
Messages
80
crontab file path : /etc/crontab
 
Last edited:
  • Like
Reactions: Oko

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
FreeNAS 9.2.1.9 (possibly it is the same as 9.3)
Why are we talking about ancient and old versions, respectively?
I am the most curios how taking snapshot triggers replication
It doesn't. The replication script is invoked regularly and new snapshots get replicated.
 

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
crontab file path : /etc/crontab
You are right. system crontab should have being first place to look plus
/conf/base/etc/crontab Looking at the /etc/crontab reveals that FreeNAS 9.2.1.9 uses a custom Python script for snapshots /usr/local/www/freenasUI/toos/autosnap.py. That script calls another script /usr/local/www/freenasUI/toos/autorepl.py which does the replication. I am going through both right now. Thank you so much for your answer.
 

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
Why are we talking about ancient and old versions, respectively?
Because that is what I run in production since I am not eager to "upgrade" the file server holding home directories of 80+ people and create the crisis situation in my organization. I am in the process of migration to newer version but it will be vanilla FreeBSD 11.00 as I find I just need a minimum subset of FreeNAS functionality and no GUI.

No reason for the aggression.
It doesn't. The replication script is invoked regularly and new snapshots get replicated.
Yes I figured out that by looking at the /etc/crontab and going through respective Python scripts. Thanks for confirming that for me.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No reason for the aggression.
No aggression is meant, it's a terse statement rolled together with a question, written from my phone.
 

Fei

Explorer
Joined
Jan 13, 2014
Messages
80
You are right. system crontab should have being first place to look plus
/conf/base/etc/crontab Looking at the /etc/crontab reveals that FreeNAS 9.2.1.9 uses a custom Python script for snapshots /usr/local/www/freenasUI/toos/autosnap.py. That script calls another script /usr/local/www/freenasUI/toos/autorepl.py which does the replication. I am going through both right now. Thank you so much for your answer.

You want to use ZFS replication migrate your data from FreeNAS to other ZFS system ?
If so ,you can use zfs send/recv command .
 
  • Like
Reactions: Oko

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
You want to use ZFS replication migrate your data from FreeNAS to other ZFS system ?
If so ,you can use zfs send/recv command .
I was planning to export and import the pool but you are suggesting safer option.
 
Status
Not open for further replies.
Top