I have run into something, that seems like a bug.
I have two pools, A and B.
Edit: FreeBSD version 12.0
On B there is a snapshotted backup of some data in two zfs datasets, eg:
B/some@snap
B/some/backup@snap
Now I deleted the corresponding datasets on pool A and want to restore them. I use:
zfs send -R B/some@snap | zfs receive -e A/new/destination
Which results in an error:
cannot receive: local origin for clone B/some/backup@snap does not exist
If I create the dataset in the receive location, the error persists. If I create the dataset and create a snapshot named @snap, the error changes into: destination has snapshots, must destroy them to overwrite it.
Why is this not possible? Is the reason, that @snap on pool B was created recursively (and incrementally) when creating the backup?
This behaviour seems weird to me, and was not expected just by reading the manual. Also the -F option did not help solving this.
I restored my backup by using zfs send B/some@snap and zfs send B/some/backup@snap
This worked, but would not be my preferred way of restoring hundreds of datasets in case something went wrong.
Kind regards
I have two pools, A and B.
Edit: FreeBSD version 12.0
On B there is a snapshotted backup of some data in two zfs datasets, eg:
B/some@snap
B/some/backup@snap
Now I deleted the corresponding datasets on pool A and want to restore them. I use:
zfs send -R B/some@snap | zfs receive -e A/new/destination
Which results in an error:
cannot receive: local origin for clone B/some/backup@snap does not exist
If I create the dataset in the receive location, the error persists. If I create the dataset and create a snapshot named @snap, the error changes into: destination has snapshots, must destroy them to overwrite it.
Why is this not possible? Is the reason, that @snap on pool B was created recursively (and incrementally) when creating the backup?
This behaviour seems weird to me, and was not expected just by reading the manual. Also the -F option did not help solving this.
I restored my backup by using zfs send B/some@snap and zfs send B/some/backup@snap
This worked, but would not be my preferred way of restoring hundreds of datasets in case something went wrong.
Kind regards