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
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?
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?