Setting up an replication task on Truenas Scale

Hi

Now that I managed to figure out how to setup the Replication task for my setup on Truenas scale. I encountered the problem of not finding a guide like this. Sure, there are some articles that go 75% of the way, but I needed to figure the rest out myself. Or I just couldn’t understand the documentation.

Now, I am going explaing my setup very shortly. I have an main nas box running on hardware and now I wanted to get that backed up to my proxmox server. I am running a Truenas Scale VM on the proxmox box, which has it’s own unique local IP-address.

I think that was enough preamble, so let’s get to the guide. This guide assumes that both systems are running truenas scale. I am showing you the guide to set this up, concentrating on the system that you want to copy (which is the one where the files are sent from)

  1. Figure out what you are actually trying to accomplish!
    Are you going to setup a single time copy or a repeating replication tasks. Also decide which user you are going to use to receive the files on the remote host.

  2. Generate the SSH public key for the remote machine where the files are going to be copied/transfered.

2a
Go to CredentialsBackup credentials

2b
Under the SSH Keypairs, click the add button
Name the SSH keypair, and press the generate Keypair button. Once the Private key and public key fileds are populated, press save- This will return you to the Backup Credentials page. Download press the download icon next to the keypair you created. It s indicated by the downwards arrow pointed at the line.
image

2c
Now we are going to add the SSH keypair that you just created to the user that you wanted to use.

Go to the CredentialsLocal users
Click on the downwards arrow on the user that you want to use and press edit.

Open the public key file you downloaded at the end of stage 2b. Copy the whole text on that .txt file to your clipboard. Then paste the private key to the authentication textbox.

2d
If you have not yet created the dataset where you want to copy the files from the other machine, create it now.

Now you have completed all the steps from the remote machine.

  1. Move to the system where you want to copy files from.

3a
Go to CredentialsBackup credentials

3b
Go to the SSH keypairs and add the private key and public key to the appropriate fields after you have picked an appropriate name for the keypair. You can also just copy the private key and the public key will auto-generate. These are the public private keys that you generated on the step 2b.

3c
Add the ssh connection to the destination host.
Name the connection (this does not have to be the host name)

I use the manual connection method.
More information can be found here

Fields
HOST
IP address of the receiving machine.
Port
The receiving SSH port on the destination host. If not changed, the default is port 22.
Username
The username that you added the SSH credentials at the step
Private key
Select the keypair that you added at step 3b.

Now press on the Discover remote host button
If the remote host key does not populate, there is some kind of problem with your SSH setup.

  1. Setting up the replication task
    4a
    Select the Data protection-page from the main menu

4b
In the replication tasks windows, press the Add-button.

Set the source location as this system and the destination location as on a different system

4c
Under the On this system
Select the datasets you want to copy or replicate.

4d
Under the On a Different System, select the SSH connection you want to use. It is the one that you created on the step 3b of this guide.

As long as that keypair is valid, you should have access to the receiving systems datasets, Select the destination dataset you want, or that you created at step 2d.

Pick if you want to use SSH transfer security. If you are on a secure LAN, it is not necesary, but if you are moving files of the internet, I would advice to use. However, I need to remind you that you know your network topology better than I, and that it is your data, not mine.

4e
Press the next button, and select the options appropriate for you based on your decisions on the step 1.

Here are my sources for this guide
(a)

(b)

(c)

I hope that this was at least of some usefulness to you. If not, feel free to complain in the comments. If you are stuck on a specific step, please specify the step in question. For example, step 2c.

1 Like