Skip to content

Error message - cannot receive incremental stream: most recent snapshot of rpoolbak/data does not match incremental source #17222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sandreas opened this issue Apr 6, 2025 · 0 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@sandreas
Copy link

sandreas commented Apr 6, 2025

System information

Type Version/Name
Distribution Name Debian
Distribution Version 12
Kernel Version 6.5.11-7
Architecture x64
OpenZFS Version 2.2.2

Describe the problem you're observing

I use the following command to sync an encrypted zfs pool rpool to an external drive rpoolbak:

zfs send --raw -RI "rpool@backup-2025-03-31" "rpool@backup-2025-04-06" | pv | zfs recv -Fdu "rpoolbak"

Which basically translates to clone the sending side 1:1 to the receiving side:

  • Destroy snapshots that do not exist on the sending side (-F)
  • Replace rpool@with rpoolbak@ / discard the sending sides filesystem name (-d)
  • Receiving filesystem is not mounted (-u

This works as expected until I start deleting any older snapshots on the source rpool. As soon as I delete an older snapshot on the SOURCE (! - the destination pool rpoolbak does NOT get modified in any way), I get this message during the backup:

cannot receive incremental stream: most recent snapshot of rpoolbak/data does not match incremental source

It still does "something" (send / receive), but it's not clear, if the resulting copy on rpoolbak is corrupt - it does seem to work though.

In my opinion this should either:

  • Show an error and do nothing without -f
  • Proceed and don't show an error

Describe how to reproduce the problem

Assuming you have a pool rpool with the following structure and the tool pv installed to watch progress / transfer speed:

rpool
rpool/ROOT
rpool/ROOT/debian
rpool/data
rpool/var-lib-vz
# create backup pool on external drive
zpool create rpoolbak /dev/sdb

# in case you have zfs-auto-snapshot running
zfs set com.sun:auto-snapshot=false rpoolbak

zfs snapshot -r "rpool@backup-2025-03-30"

# full backup
zfs send --raw -R "rpool@backup-2025-03-30" | pv | zfs recv -Fdu rpoolbak

# change some files

# create a "newer" snapshot
zfs snapshot -r "rpool@backup-2025-03-31"

# incremental backup
zfs send --raw -RI "rpool@backup-2025-03-30" "rpool@backup-2025-03-31" | pv | zfs recv -Fdu "rpoolbak"

# change some files

# destroy old snapshot (e.g. to gain space)
zfs destroy rpool@backup-2025-03-30

# create snapshot
zfs snapshot -r "rpool@backup-2025-04-01"

# incremental backup after destroying old snapshot
zfs send --raw -RI "rpool@backup-2025-03-31" "rpool@backup-2025-04-01" | pv | zfs recv -Fdu "rpoolbak"
# error: 
# cannot receive incremental stream: most recent snapshot of rpoolbak/data does not match incremental source
@sandreas sandreas added the Type: Defect Incorrect behavior (e.g. crash, hang) label Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

1 participant