Unable to do an incremental send of encrypted dataset after renaming snapshots

Hello,

Recently, I started using ZFS on my NixOS laptop.
Also, I started using ZFS on my external hard drive that I use for backup.
I successfully made a backup of my encrypted datasets and used incremental sending of snapshots.
After that, I decided I want to rename my snapshots to follow ISO 8601 date format.
Which I did on both my laptop and on my external hard drive.
However, after that I was not able to send incremental snapshots.

rpool is the pool that I use on my laptop, extpool is the pool on my external hard drive.

Here’s the list of my datasets:

[root@hp-laptop:~]# zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
extpool                   328G   571G    24K  /extpool
extpool/dataset-1         162G   571G   162G  /extpool/dataset-1
extpool/hp-bak-enc        166G   571G    99K  /extpool/hp-bak-enc
extpool/hp-bak-enc/home   166G   571G   162G  /extpool/hp-bak-enc/home
rpool                     181G   261G    24K  none
rpool/enc                 181G   261G    98K  none
rpool/enc/home            166G   261G   161G  legacy
rpool/enc/nix            14.7G   261G  14.7G  legacy
rpool/enc/root            171M   261G   171M  legacy

Here’s the list of my snapshots:

[root@hp-laptop:~]# zfs list -t snapshot
NAME                                                        USED  AVAIL  REFER  MOUNTPOINT
extpool/hp-bak-enc@--head--                                  83K      -    95K  -
extpool/hp-bak-enc/home@2024-07-21_original_backup         2.86G      -   162G  -
extpool/hp-bak-enc/home@2024-07-21_backup_after_cleaning   7.24M      -   160G  -
extpool/hp-bak-enc/home@2024-07-22                         11.2M      -   162G  -
rpool/enc/home@2024-07-21_original_backup                  2.86G      -   162G  -
rpool/enc/home@2024-07-21_backup_after_cleaning            7.25M      -   160G  -
rpool/enc/home@2024-07-22                                  81.1M      -   162G  -
rpool/enc/home@2024-07-22_before_playing_with_thunderbird  6.78M      -   162G  -
rpool/enc/home@2024-07-24_after_fixing_thunderbird         21.0M      -   162G  -
rpool/enc/home@2024-07-27_before_deleting_cache_dir         344M      -   162G  -

Here’s the command I used for sending the snapshots:

[root@hp-laptop:~]# zfs send -v -w -I @2024-07-22 rpool/enc/home@2024-07-27_before_deleting_cache_dir | zfs receive extpool/hp-bak-enc/home
send from @2024-07-22 to rpool/enc/home@2024-07-22_before_playing_with_thunderbird estimated size is 242M
send from @2024-07-22_before_playing_with_thunderbird to rpool/enc/home@2024-07-24_after_fixing_thunderbird estimated size is 57.1M
send from @2024-07-24_after_fixing_thunderbird to rpool/enc/home@2024-07-27_before_deleting_cache_dir estimated size is 272M
total estimated size is 571M
TIME        SENT   SNAPSHOT rpool/enc/home@2024-07-22_before_playing_with_thunderbird
cannot receive incremental stream: destination extpool/hp-bak-enc/home has been modified
since most recent snapshot

Maybe this problem is not related to renaming snapshots at all, since this is my second time that I’m doing incremental sending at all…

Thanks a lot!

This is your clue right here. You’re not using -F on your zfs recieve command, so if any modifications have been made to the target–which can be as simple as lsing a directory with atime on–the receive process will fail with this error.

1 Like

which can be as simple as lsing a directory with atime

It seems that’s exactly what happend, I remember mouting and inspecting the dataset after the first time I did an incremental send.
I executed the following zfs diff commands and they returned nothing which made me sure it’s just atime:

zfs diff extpool/hp-bak-enc/home@2024-07-22 extpool/hp-bak-enc/home
zfs diff -t extpool/hp-bak-enc/home@2024-07-22 extpool/hp-bak-enc/home

I unmounted the dataset, did a rollback and after that I was able to successfully execute zfs send.

Thanks a lot for help! :smiley:

1 Like