btrbk
btrbk copied to clipboard
Failed to fetch subvolume detail / readlink: unrecognized option: e
Hi,
I downloaded the master version of btrbk today to try to backup the content of one SDD onto another one on my Turris Omnia router+NAS running Turris OS. But I get the error message:
Failed to fetch subvolume detail [...] readlink: unrecognized option: e
I have never done BTRFS backups or used btrbk before... Am I doing something incorrect?
Here is some more information:
root@turris:~# uname -a Linux turris 4.14.254 #0 SMP Tue Nov 23 09:52:21 2021 armv7l GNU/Linux
root@turris:~# grep mnt /etc/mtab /dev/sda1 /mnt/backup btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0 /dev/sdb1 /mnt/nas btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0
root@turris:~# btrbk ls / MOUNT_SOURCE ID FLAGS PATH /dev/mmcblk0p1 256 - / /dev/sda1 5 - /mnt/backup /dev/sdb1 5 - /mnt/nas
root@turris:~# cat /etc/btrbk.conf timestamp_format long snapshot_preserve_min 18h snapshot_preserve 48h snapshot_dir /mnt/backup subvolume /mnt/nas/florent
root@turris:~# btrbk --dry-run run WARNING: Skipping subvolume "/mnt/nas/florent": Failed to fetch subvolume detail WARNING: ... Command execution failed (exitcode=1) WARNING: ... sh: readlink -v -e '/mnt/nas/florent' WARNING: ... readlink: unrecognized option: e WARNING: ... BusyBox v1.30.1 () multi-call binary. WARNING: ... WARNING: ... Usage: readlink [-fnv] FILE WARNING: ... WARNING: ... Display the value of a symlink WARNING: ... WARNING: ... -f Canonicalize by following all symlinks WARNING: ... -n Don't add newline WARNING: ... -v Verbose
Backup Summary (btrbk command line client, version 0.32.0-dev)
Date: Sun Dec 5 16:26:00 2021 Config: /etc/btrbk.conf Dryrun: YES
Legend: === up-to-date subvolume (source snapshot) +++ created subvolume (source snapshot) --- deleted subvolume *** received subvolume (non-incremental) >>> received subvolume (incremental)
/mnt/nas/florent !!! Aborted: Failed to fetch subvolume detail
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!
Try setting the compat in your config. Or more specifically, set compat_remote in the target section pointing to your NAS.
Brilliant thanks! I was following the examples in the readme and did obviously not stumble upon compat beforehand. Suggestion: perhaps you could catch these errors and enrich the error message by suggesting that the user uses compat.
Right after that, I got a second error:
ERROR: Skipping subvolume "/mnt/nas/florent": subvolume has no UUID
This error is documented in the FAQ, but without a solution. Apparently, in recent versions of btrfs-progs, it is possible to use the -u option of btrfstune to assign an arbitrary UUID. I am currently trying this (this takes a while). This may be worth mentioning in th FAQ.
Apparently, in recent versions of btrfs-progs, it is possible to use the -u option of btrfstune to assign an arbitrary UUID. I am currently trying this (this takes a while). This may be worth mentioning in th FAQ.
Any success with btrfstune? would be nice to have a solution to this in the FAQ.
No success...
btrfstune -u /dev/sda1 was successful and I confirmed the UUID change with:
# blkid /dev/sda1 /dev/sda1: LABEL="backup" UUID="64d3c7e4-a0b3-404e-a79a-261cab3e166d" UUID_SUB="3a18664c-8412-4f60-9d1d-b79f488ae65e" TYPE="btrfs" PARTUUID="19d9d024-6e28-41ac-b49d-3d028a40cef0"
But after mounting the partition, btrfs still doesn't list a UUID:
btrfs subvolume show /mnt/backup / Name: <FS_TREE> UUID: -
In summary, blkid lists a filesystem UUID and btrfs subvolume a subvolume UUID.
For what it's worth, I verified that wiping and recreating the BTRFS partition with mkfs.btrfs works in adding a subvolume UUID.