Replication using SSH+NETCAT on TrueNAS Core 12.0-U6.1

kekoakeakane

Dabbler
Joined
Apr 20, 2019
Messages
12
I decided to switch my replication from my main TrueNAS server to my backup TrueNAS servers from SSH to SSH+NETCAT. Both of my servers are on my local network and connected via 10Gb network cards, switches and DAC. I wanted to increase the speed of my replications. I created a test dataset and new snapshot and replication before messing with my already working setup. My first attempt at this went rather poorly. I first attempted to not fill in any of the NETCAT information on the destination end, but the GUI wouldn't let me save. I tried filling in the information one at a time and after putting logical information in all the blocks, the GUI let me save. I had assumed that the IP addresses (Active Side Listen Address and Active Side Connect Address) should be the backup server IP address. I had no clue as to which port numbers to use or how to determine them. The help (?) also lead you to believe that the receiving server should designate a port it is listening on. This configuration failed with an error when I attempted to run the task.

I then turned to the all knowing internet. First I consulted the TrueNAS documentation server. That was very ineffective. The only mention of replication using SSH+NETCAT says that you will need to fill in all this information, but gives you no guidance on how. A google search on the topic brings up very few responses. There is one response on this forum that says to just leave everything default. That method does result in the GUI allowing me to save the task, but does not allow me to navigate the destination folders.

After some trial and error and multiple test replications, I have come up with a repeatable way to set up SSH+NETCAT replication between 2 TrueNAS servers using the GUI.
1) Create a replication task using SSH as the transport mechanism. You will need to have a "SSH Connection" established (i.e. created the SSH Keypair). This will allow you to navigate the destination folders as normal.
2) Save this replication task.
3) Edit the replication task you just created. Change the transport mode to SSH+NETCAT and the Netcat Active Side to LOCAL or REMOTE. Don't change anything else. Save the task. This task should run using the new transport mode.

A few notes about the above method. I can confirm that the transport method was changed as the replication of the Test Dataset using SSH transferred at about 120 MB/s (1 Gb/s) on a 10Gb network. However, the replication of the same Test Dataset using SSH+NETCAT transferred at about 700 MB/s ( 5 Gb/s) on the same 10Gb network. Interestingly, I got the same transfer speeds using LOCAL and REMOTE. I ran all tests twice just to confirm results.

I would appreciate if someone could explain the difference between LOCAL and REMOTE with regards to using SSH+NETCAT.

I hope this helps anyone else trying to pursue this same endeavor.
 
Top