digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.64k stars 120 forks source link

[Bug Report] "btrbk diff" without "sudo" throws error (backend_local_user=btrfs-progs-sudo) #593

Open JorisBlom opened 1 month ago

JorisBlom commented 1 month ago

I added the commands btrfs, readlink, and test to the sudoers file and set backend_local_user=btrfs-progs-sudo. btrbk without sudo should now be possible. However, 'btrbk diff user.20240714T0229 user.20240716T1705' returns:

btrbk diff user.20240714T0229 user.20240716T1705
ERROR: Failed to fetch modified files for: /mnt/backup/user.20240716T1705
ERROR: ... Command execution failed (exitcode=1)
ERROR: ... sh: btrfs subvolume find-new '/mnt/backup/user.20240716T1705' 1632
ERROR: ... can't perform the search: Operation not permitted
ERROR: ... can't perform the search: Operation not permitted

It is trying to execute btrfs subvolume find-new '/mnt/backup/user.20240716T1705' 1632. This command is not appended with sudo -n like it should be (backend_local_user=btrfs-progs-sudo). Therefore, the command fails.