Can TrueNAS's built in Replication pull Sanoid snapshots?

Joined
Sep 13, 2014
Messages
149
I'm looking to setup a replication schedule where my TrueNAS server will pull data from my Proxmox server.

The Proxmox server is running Sanoid in order to create and manage snapshots. It's a configuration that I'd rather not change but I'd also prefer to avoid installing anything on the base of my TrueNAS OS. Thus the question... can I use the TrueNAS Replication GUI to pull Snapshots that were created using Sanoid, from my Proxmox server?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Maybe...

TrueNAS Replication expects the executables on both sides to live in the place where it would be on that version of TrueNAS.

If that's the case (or you make it so with a link or 2), maybe it would go OK.
 
Joined
Sep 13, 2014
Messages
149
TrueNAS Replication expects the executables on both sides to live in the place where it would be on that version of TrueNAS.
I'm not sure I understand your reply. What executables are you referring to?

In any event, it looks like I may have found confirmation that it's possible. I found a few comments in a feature request thread (if that's what they're called) on Sanoid's github - https://github.com/jimsalterjrs/sanoid/issues/552#issuecomment-770517525

It looks like I'd just have to define a custom naming schema for snapshot but I'm gonna carry on searching for more info.
 
Joined
Sep 13, 2014
Messages
149
WARNING: Disregard this comment until I remove this warning.


I've just tested setting up PULL replication from my Proxmox system to my TrueNAS system and it (assuming I've done it correctly) was pretty straight forward. So I'm gonna leave some pointers, just in case anyone else is addressing the same issue but first a word of warning... I'm not the most knowledgeable user, so proceed at your (and your data's) own risk.

1. SSH

As I'm going to pulling the data via an SSH connection, the first order of business was to create an SSH keypair. I did this on TrueNAS System>SSH Keypairs.

I then manually copied the Public Key, from the keypair, into the the following file /root/.ssh/authorized_keys. I then had to restart the sshd service, systemctl restart sshd.service.

2. SSH Connection

In the process of creating the Replication task, I was given the option of either choosing an existing one, or creating a new SSH Connection. I created a new one and intially used "root@pam" as the username, having read that the "@pam" bit is required. I must have gotten my wires crossed, because it looks like just "root" is all that's needed.

3. Sanoid Naming Schema and TrueNAS Replication

I created an Advanced Replication Task in TrueNAS (Tasks>Replication Tasks) and filled in all the relevant information. Inclduing the naming schema used by Sanoid, autosnap_%Y-%m-%d_%H:%M:%S_XXXXXX, replacing the "XXXXXX" with something like "daily", "hourly" or "frequently", depending on how you have Sanoid configured and what snapshots you want to replicate.

4. PULL Replciations require a schedule

As the title says, in order to get the Replcation Task to run, I had to configure a Scheudle before I could save the Task... But after I had saved the Task, I was able to run it straight away, manually, from the Tasks>Replication Tasks screen in order to check that it worked.


Now the next question I need to answer is what do I need to do in regards to retention policies?
 
Last edited:
Top