Incremental Replication - I must be missing something

Status
Not open for further replies.

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
I'm trying to replicate from a desktop ZFS pool incrementally. I'm not sure if I'm missing something as I don't see how it's possible to do this without knowing the previous snapshots name. The problem I'm having is that I want to be able to replicate from the desktop incrementalally between the last snapshot I sent, and the current snapshot I just took without having to know in advance what the last snapshot I sent was.

The easiest way I have found to do this is by doing this

e.g. where I'm replicating to the dataset tank/rep
Code:
ssh ${user}@${ip} zfs list -H -o name,creation -p -t snapshot -r tank/rep |  \
    grep "^tank/rep@" | # Look for line starting with tank/rep@
    sort -n -k 2 |  \ # Sort second tab numerically
    tail -1 |  \ # Take last line
    cut -f1 # Take first column


I would think there would be a way to easily query this or tell zfs receive to replicate between the last snapshot and the current snapshot, but I don't see a way to easily do this. What do most people do when they're replicating to find out what the last snapshot sent was?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I think that's the way ZFS works.

I would look into zrep and znapzend to automate the process.
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
I think that's the way ZFS works.

I would look into zrep and znapzend to automate the process.
zrep looks promising. Does it work OK Linux -> FreeBSD?
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
zrep looks promising. Does it work OK Linux -> FreeBSD?
I don't have any experience with replication from Linux. But it appears to be a script, so it is likely.
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
I don't have any experience with replication from Linux. But it appears to be a script, so it is likely.
I'm setting up ZnapZend at the moment. Will let you know how it goes.
 

dpearcefl

Contributor
Joined
Aug 4, 2015
Messages
145
How did you make out?
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
I ended up using ZnapZend, works great.
 
Status
Not open for further replies.
Top