Replicate Data From Server A to Server B

It looks like I have solved my ATA count issue. For a while there, I had thought I lost my 1000 movie, tons of TV show plex source data :(. As is typical, this spured me to look at a non DVD backup.

I have a Prod server (with plex) and a Devl server (smaller, focused for experimenting). I want to replicate data from Prod to Devl. I have reviewed various guides looking at creating a replication task …

  • TrueNAS SCALE Evaluation Guide | Remote Replication PUSH / PULL wants you to set up specific replication users :frowning:
  • Backup & Recovery Made Easy: TrueNAS ZFS Replication Tutorial worked but the wizard dropped the data in there read-only (I didn’t want that flag set)

I tried the 2nd method with the advanced features where I could turn off read-only setting … but it didn’t like me. I got this error message …

[EINVAL] replication_create.periodic_snapshot_tasks:
You must at least either bind a periodic snapshot task
or provide "Also Include Naming Schema" or "Name
Regex" for push replication task

… and I couldn’t work out what it wanted. What magic box am I checking or unchecking?

Hmmm … some google before I post suggests that I need to create a periodic snapshot so that this replication task knows what to replicate.

I believe you are correct, you need to create snapshots and then you can replicate them. I thought there was a way to have the replication job automatically create the snapshots but I do not see nee that option (I may be thinking of CORE).

I create the snapshots on my production TN and then create the replication job on my backup TN pulling the data from the production TN.

If you are using ZFS replication, then the destination must be read only. The reason is that ZFS replication uses snapshots on both ends and just sends incremental changes between 2 sequential snapshots from the source to the destination. If the snapshot has changed on the destination then ZFS cannot apply the changes from the source.

What you can do, and this makes lots of assumptions, is setup ZFS replication and then on the destination create a CLONE of a snapshot. The CLONE will be writeable. This will NOT be like an rsync job that updates with ongoing changes, your CLONE will be based on the fixed point in time of the snapshot it is based on.

TrueNAS replications are not “snapshot on demand” like some other solutions, namely Syncoid.

TrueNAS requires snapshots to exist, where the Replication Task can use them for sending to another destination, whether full or incremental.

Create a Periodic Snapshot Task, then point the Replication Task to it in the drop-down menu.

I am finding some funny differences between the replicate wizard and the replicate ‘advanced’ (ie not wizard).

Wizard …

  • don’t worry about creating the snapshot first, I will do that on the fly
  • no - you can’t push a replication to a dataset that already exists

Non Wizard …

  • Hang on there Sonny - I need a snapshot first
  • sorry (not sorry) - the target dataset has to exist!

My whole thinking here is that I want to backup my Plex media to another server. I am thinking that means replicate … but when I do that, it comes over as read only (I am ok with that) but then Share / SMB doesn’t seem to like looking / providing access to read-only.

And if my Prod data gets trashed, how do I restore it?

I will run some tests on this.

Are you sure? Unless they changed something in recent versions of SCALE, this has not been the case with Core or earlier versions of SCALE.

For the target, you can manually type in the name of the destination dataset. If it doesn’t exist, it will be created.

From the backup, replicate it back to the new pool.

You can also make your backup pool your new main pool and then build a new backup pool.


What do you mean?

I got a small replication of a snapshot to work. I have set up the bigger version for tomorrow and set it to create a new dataset.

I might have been mis-reading the errors I was getting (SMB on read-only, different actions between wizard and advanced).

I just tested on my backup TN running 25.04 (FT) and holding replicated snapshots of data from my production TN running 24.10.2.2 (EE). I was able to create the SMB share, I was even able to create with the default (RW) permissions, but to be safe (and sane) I selected No Preset for permissions and went into Advanced mode and made the share Read Only. Previous Versions (via Windows 11 Explorer) even shows the snapshots as it should.

I did confirm that I can open files :slight_smile:

1 Like

First snapshot and replicate just finished. Nice! I now have a copy of my plex media that is about 2 feet from my original. Not much of a back up but you have to start somewhere.

I have set the snapshot to run on Mon and Thu nights. I expect the subsequent ones will be very quick as it only grabs the differences (if I am right in my research).