Skip to content
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

Failed to fetch subvolume detail for snapshot_dir #576

Open
alexeiroz opened this issue Dec 23, 2023 · 1 comment
Open

Failed to fetch subvolume detail for snapshot_dir #576

alexeiroz opened this issue Dec 23, 2023 · 1 comment

Comments

@alexeiroz
Copy link

alexeiroz commented Dec 23, 2023

Hello

I'm a new btrfs and btrbk user.
I'm trying to backup my laptop SSD to external USB HDD with btrbk.
Both internal and external drives are btrfs.
But unfortunately I unable to pass even the dry ran stage.
I'm keep getting the following error:

>sudo btrbk -l debug -c /home/nc/btrbk/btrbk-msi-laptop-2.conf -v -n run
btrbk command line client, version 0.32.6  (Sat Dec 23 17:54:29 2023)
Using configuration: /home/nc/btrbk/btrbk-msi-laptop-2.conf
WARNING: Skipping subvolume "/mnt/btr_pool/@": Failed to fetch subvolume detail for snapshot_dir
WARNING: ... Command execution failed (exitcode=1)
WARNING: ... sh: readlink -v -e '/mnt/btr_pool/btrbk_snapshots'
WARNING: ... readlink: /mnt/btr_pool/btrbk_snapshots: No such file or directory
Completed within: 0s  (Sat Dec 23 17:54:29 2023)
--------------------------------------------------------------------------------
Backup Summary (btrbk command line client, version 0.32.6)

    Date:   Sat Dec 23 17:54:29 2023
    Config: /home/nc/btrbk/btrbk-msi-laptop-2.conf
    Dryrun: YES

Legend:
    ===  up-to-date subvolume (source snapshot)
    +++  created subvolume (source snapshot)
    ---  deleted subvolume
    ***  received subvolume (non-incremental)
    >>>  received subvolume (incremental)
--------------------------------------------------------------------------------
/mnt/btr_pool/@
!!! Aborted: Failed to fetch subvolume detail for snapshot_dir

NOTE: Some errors occurred, which may result in missing backups!
Please check warning and error messages above.

NOTE: Dryrun was active, none of the operations above were actually executed!

Below some information about my system configuration:

>cat /etc/os-release 
NAME="openSUSE Tumbleweed-Slowroll"
# VERSION="20231219"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20231219"
PRETTY_NAME="openSUSE Tumbleweed-Slowroll"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20231219"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/openSUSE:Slowroll"
LOGO="distributor-logo-Tumbleweed"
> btrbk --version
btrbk command line client, version 0.32.6
at /home/nc/btrbk/btrbk-msi-laptop-2.conf 
snapshot_preserve_min   2d
snapshot_preserve       14d
target_preserve_min     no
target_preserve         20d 10w *m

target         /mnt/usb-backup/btrbk-msi-laptop

volume          /mnt/btr_pool/
 snapshot_dir    btrbk_snapshots
 subvolume      @
 #subvolume      @/home
 #subvolume     /@/var
 #subvolume     /@/usr/local
 #subvolume     /@/srv
 #subvolume     /@/root
 #subvolume     /@/opt
 #subvolume     /@/boot/grub2/x86_64-efi
 #subvolume     /@/boot/grub2/i386-pc
> cat /etc/fstab 
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /                       btrfs  defaults                      0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /var                    btrfs  subvol=/@/var                 0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /root                   btrfs  subvol=/@/root                0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /home                   btrfs  subvol=/@/home                0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=8159fe0a-742d-4fbd-becf-fb31cd93a64f  swap                    swap   defaults                      0  0
UUID=b16700d9-c4bb-427f-b7e0-e9f03e1aac03  /.snapshots             btrfs  subvol=/@/.snapshots          0  0

/dev/sda2  /mnt/btr_pool  btrfs  subvolid=5,noatime  0 0
> sudo btrfs subvolume list /
ID 256 gen 30 top level 5 path @
ID 257 gen 2089 top level 256 path @/var
ID 258 gen 1389 top level 256 path @/usr/local
ID 259 gen 1389 top level 256 path @/srv
ID 260 gen 1694 top level 256 path @/root
ID 261 gen 1390 top level 256 path @/opt
ID 262 gen 1997 top level 256 path @/home
ID 263 gen 25 top level 256 path @/boot/grub2/x86_64-efi
ID 264 gen 1213 top level 256 path @/boot/grub2/i386-pc
ID 265 gen 2027 top level 256 path @/.snapshots
ID 266 gen 2082 top level 265 path @/.snapshots/1/snapshot
ID 267 gen 76 top level 265 path @/.snapshots/2/snapshot
ID 268 gen 128 top level 265 path @/.snapshots/3/snapshot
ID 269 gen 378 top level 265 path @/.snapshots/4/snapshot
...
> sudo btrfs subvolume list /mnt/btr_pool 
ID 256 gen 30 top level 5 path @
ID 257 gen 2092 top level 256 path @/var
ID 258 gen 1389 top level 256 path @/usr/local
ID 259 gen 1389 top level 256 path @/srv
ID 260 gen 1694 top level 256 path @/root
ID 261 gen 1390 top level 256 path @/opt
ID 262 gen 1997 top level 256 path @/home
ID 263 gen 25 top level 256 path @/boot/grub2/x86_64-efi
ID 264 gen 1213 top level 256 path @/boot/grub2/i386-pc
ID 265 gen 2027 top level 256 path @/.snapshots
ID 266 gen 2082 top level 265 path @/.snapshots/1/snapshot
ID 267 gen 76 top level 265 path @/.snapshots/2/snapshot
...
@denisalevi
Copy link

Either your btrfs top volume is not mounted at /mnt/btr_pool and/or you didn't create the snapshot directory btrbk_snapshots (it is not created by btrbk, you need to create it, see docs)

  1. Make sure your root is mounted at /mnt/btr_pool:
    sudo mount /dev/to/your/btrfs/top/volume /mnt/btr_pool
    
  2. Create the missing snapshot_dir:
    sudo mkdir /mnt/btr_pool/btrbk_snapshots
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants