Replicating existing snapshots

Joined
Oct 22, 2014
Messages
7
Basic description: I had a drive go bad with a GELI encrypted array and ended up just building a new array out of the disks (with a new one to replace the bad drive). Now I'm trying to push the snapshots I've got on the backup server over to the new one. The main server's called "Vacuum" and the backup is just called "Backup". I've got several encrypted datasets which mostly didn't change, but there were changes occasionally that I'd like to keep for the duration of the snapshots in case something went wrong and none of the users noticed yet.

Problem: My archaic naming scheme snapshots aren't replicating when I try building a replication task to send them to the new array. I'm looking for a way to replicate them back to the main server.

I have been fairly naughty as an admin, I've not really made any changes to the servers' settings since probably FreeNas 11 or so. My periodic snapshot name format is the old auto-%Y%m%d.%H%M as seen in the image below (a report of
Code:
zfs list -rt snapshot | grep Documents
).
Screenshot from 2023-05-03 12-18-32.png

the last snapshot on the list is one that was created when I built a replication task through the GUI wizard to push the data from the backup server over to the main.
While this does, sort of, work, when I run the replication task (small snapshot below, the key's been removed for the screenshot), all that replicates is the very last snapshot.
Screenshot from 2023-05-03 12-36-59.png

as evidenced by this:
Screenshot from 2023-05-03 12-42-03.png

I've tried building a replication task just for the older snapshots. I just get the following error:
Code:
[2023/05/03 15:43:03] INFO     [Thread-42] [zettarepl.paramiko.replication_task__task_14] Connected (version 2.0, client OpenSSH_8.8-hpn14v15)
[2023/05/03 15:43:03] INFO     [Thread-42] [zettarepl.paramiko.replication_task__task_14] Authentication (publickey) successful!
[2023/05/03 15:43:04] INFO     [replication_task__task_14] [zettarepl.replication.pre_retention] Pre-retention destroying snapshots: []
[2023/05/03 15:43:04] INFO     [replication_task__task_14] [zettarepl.replication.run] No snapshots to send for replication task 'task_14' on dataset 'stor1/Documents'
[2023/05/03 15:43:04] ERROR    [replication_task__task_14] [zettarepl.replication.run] For task 'task_14' non-recoverable replication error ReplicationError("Dataset 'stor1/Documents' does not have any matching snapshots to replicate")


To me, it looks like it doesn't understand the "auto-%Y%m%d.%H%M" snapshot name schema. Is there a way to push or pull them over into the new encrypted dataset?
 

RFC793

Cadet
Joined
Feb 13, 2024
Messages
2
Did you figure this one out? I would like to do the same thing, as I keep snapshots independent of the automatic snapshots that I use solely for replication. Basically, I just want TrueNAS to use `-I` instead of `-i`. I'd like to use the actual replication feature, as it has nice reporting, can leverage the "SSH Connections", etc, but I might have to settle for a custom script.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
On SCALE you can also use regex .* under "also include snapshots with the name"

A quick search did not indicate that functionality on core. You may create a feature request for that to be also available in core?

There seem to be rules for naming periodic snapshot tasks, that apply there. If you do a manual snapshot, can you deviate from that scheme? Otherwise you probably just need to add all matching naming schemes manually there. I'd still rather use regex though.

Hope that helps!

* I don't use core
 
Top