Skip to content

After Restore of snapshot: No dependencies are shown #7

@Daniel-at-git

Description

@Daniel-at-git

After I restored a snapshot the dependencies are not shown.

To reproduce the issue...
Generate a test volume and some snapshots

btrfs subvolume create test   # Create new subvolume
btrfs subvolume snapshot test test-backup  # Do a backup
btrfs subvolume snapshot test test-backup2   # Another backup

Show it with btrfs-list

btrfs-list /mnt/pro/ |grep -E 'NAME|single|test'
NAME                                          TYPE    REFER     EXCL  MOUNTPOINT
b04de56b                                        fs       -   374.04G (single, 546.00G free)
   test                                     subvol   16.00k   16.00k 
      test-backup                             snap   16.00k   16.00k 
      test-backup2                            snap   16.00k   16.00k 

If you now have to restore your test-backup2 you do

btrfs subvolume delete test
Delete subvolume (no-commit): '/mnt/pro/test'
btrfs subvolume snapshot test-backup2 test
Create a snapshot of 'test-backup2' in './test'

And after some days create a new backup
btrfs subvolume snapshot test test-backup-after-restore

Now btrfs-list didn't show dependencies ("test-backup-after-restore" should depend to "test")

btrfs-list /mnt/pro/ |grep -E 'NAME|single|test'
NAME                                          TYPE    REFER     EXCL  MOUNTPOINT
b04de56b                                        fs       -   374.04G (single, 546.00G free)
test-backup2                                  snap   16.00k   16.00k 
test                                          snap   16.00k   16.00k 
test-backup                                   snap   16.00k   16.00k 
test-backup-after-restore                     snap   16.00k   16.00k 

"test-backup-after-restore" is shown as snapshot with normal btrfs tool:

btrfs subvolume show test
test
        Name:                   test
        UUID:                   8db29b7d-5331-7742-af40-92b65eb22884
        Parent UUID:            57fadfee-483f-0b42-9229-c68bf12ddabc
        Received UUID:          -
        Creation time:          2022-01-02 10:41:07 +0100
        Subvolume ID:           474
        Generation:             87841
        Gen at creation:        87834
        Parent ID:              5
        Top level ID:           5
        Flags:                  -
        Send transid:           0
        Send time:              2022-01-02 10:41:07 +0100
        Receive transid:        0
        Receive time:           -
        Snapshot(s):
                                test-backup-after-restore
        Quota group:            0/474
          Limit referenced:     -
          Limit exclusive:      -
          Usage referenced:     16.00KiB
          Usage exclusive:      16.00KiB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions