Solved zfs send with mbuffer failed.

Hello everyone,

I tried to use the mbuffer when sending the snapshot stream, but it didn't work.

Host2:
mbuffer -m 200M -I 9000 | zfs receive -duvF backuppool

Host1
zfs send -Rv zroot@1 | mbuffer -m 200M -O host2.example.com:9000

When executing zfs send on host1, the prompt:
Code:
skipping snapshot zroot/Root/default@2 because it was created after the destination snapshot (1)
...

After doing nothing. Where is the mistake?
 
Assuming @2 exists and is older than @1, I’m not sure what you’re considering an issue here...

Snapshot 2 is new, but I am sending a snapshot 1. I am not sure why it prompts for snapshot 2.


I deleted snapshot 2, but mbuffer prompted:
mbuffer: warning: error connection to host2.example.com:9000: Connection refused

I found that the host 2 did not listen to port 9000.
After using -4 to force it to use IPv4, it is finally normal.

When using IPv4 and IPv6 dual stack, mbuffer only listens to IPv6 by default, if the -4 parameter is not specified.
I don't know if this is a bug.
 
Snapshot 2 is new, but I am sending a snapshot 1. I am not sure why it prompts for snapshot 2.

Likely because you've asked for verbose output, and -R is 'frequently' used to send the latest state (snapshot) to the remote side, so someone made the decision to inform the user when the selected snapshot to send is not the most recent.

Be very careful using -F on the receive side; be sure you've read and understand the zfs(8) manual page, especially since it will destroy filesystems and snapshots on the receive side that do not (or no longer) exist on the sending side.
 
Back
Top