Zfs send individual snapshots?

squeakybadger

Dabbler
Joined
Feb 10, 2020
Messages
13
Hi,

I have our main Truenas server(A) that does nightly snapshots to the backup Truenas server(B), only keeping a weeks worth of snapshots.

I have built another Truenas server(C) to be used as an offsite backup.

Server(C) is pulling the last weeks snapshots from server(B)

As it was the first replication task it took a few days to send all the data over, and now it says that it cannot do the nightly as the next snapshot needed has been deleted off server(B)

I basically need to send the missing snapshots that are still on server(A) to server(C) so it has a complete set and can continue to replicate.

This is the command I was trying, but I seem to be struggling with the syntax to send over the individual snapshots (and not overwriting what already exists)

zfs send -I SERVERA/PROJECTS@auto-2022-11-21_00-00 | ssh root@192.168.xxx.xxxx zfs recv SERVERC/PROJECTS

Using the -I command it says it can't find the dataset, and just using zfs send says it will overwrite everything as SERVERC/PROJECTS is not empty.

Any help to get this sorted is appreciated!

Thanks.
 
Joined
Oct 22, 2019
Messages
3,641
Using the -I command it says it can't find the dataset
-I or -i requires two snapshots to be specified, as it will send an incremental replication of the differences between the two snapshots, under the condition that the base snapshot (the first one specified) must also exist on the destination.

---

For future reference, you'll either have to:

1) Redo your setup and expiration times (as well as reconfigure your Replication Tasks) so that you won't lack necessary base snapshots that exists on the source and all destinations.

2) Make use of "ZFS bookmarks", which is not exposed to the GUI. (You'll have to do it manually or with some automated scripts.) Another caveat is that iXsystems' "zettarepl" does not use bookmarks. :frown:

EDIT: Oh lookie here, a feature request from over two years ago... Sigh... :confused:
 
Last edited:

squeakybadger

Dabbler
Joined
Feb 10, 2020
Messages
13
Ah, yes that makes sense specifying 2 snapshots for it.

I think I'll just rejig the snapshot lifetimes and redo from scratch as that original one doesn't exist.

Thanks for the help.
 
Top