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

Update ssh_filter_btrbk.sh to allow stream_compress with adaptive compression #600

Open
zwimer opened this issue Sep 3, 2024 · 2 comments · May be fixed by #601
Open

Update ssh_filter_btrbk.sh to allow stream_compress with adaptive compression #600

zwimer opened this issue Sep 3, 2024 · 2 comments · May be fixed by #601

Comments

@zwimer
Copy link

zwimer commented Sep 3, 2024

Currently my btrbk.conf contains:

stream_compress_adapt      yes
stream_compress            zstd

I have my backup NAS set to run with ssh_filter_btrbk.sh. When I do it fails with something like:

ERROR: Failed to send/receive subvolume: /.btrbk_snap/home.20240903T0000 [//.btrbk_snap/home.20240902T0000] -> NAS:/mnt/main/btrbk/PC/home.20240903T0000
ERROR: ... SSH command failed (exitcode=255)
ERROR: ... sh: btrfs send -p '//.btrbk_snap/home.20240902T0000' --compressed-data '/.btrbk_snap/home.20240903T0000' | mbuffer -v 1 -q -m 256m | zstd -c --adapt | ssh -i '/root/.ssh/id_ed25519.btrbk' -o compression=no root@NAS 'zstd -d -c --adapt | btrfs receive '\''/mnt/main/btrbk/PC/'\'''
ERROR: ... ssh_filter_btrbk.sh: ssh command rejected: disallowed command (restrict-path: "/mnt/NAS/btrbk/PC"): zstd -d -c --adapt | btrfs receive '/mnt/main/btrbk/PC/'
ERROR: ... failed to check target subvolume: NAS:/mnt/main/btrbk/PC/home.20240903T0000
ERROR: ... Command execution failed (exitcode=1)

It would be nice if the default ssh_filter_btrbk.sh permitted this user of zstd.

@zwimer zwimer changed the title Update ssh_filter_btrbk.sh to allow stream_compress for zstd (and others as needed) Update ssh_filter_btrbk.sh to allow stream_compress with adaptive compression Sep 3, 2024
@zwimer
Copy link
Author

zwimer commented Sep 3, 2024

The problem seems to be that the regex does not allow --adapt to be passed to zstd. I might be able to PR this myself

@zwimer zwimer linked a pull request Sep 3, 2024 that will close this issue
@zwimer
Copy link
Author

zwimer commented Oct 28, 2024

@digint Can I do anything to help get this merged?

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

Successfully merging a pull request may close this issue.

1 participant