SSH_FILTER_BTRBK(1)
π SSH_FILTER_BTRBK(1) β the Btrbk Manual, but make it make sense
okay bestie, so this is ssh_filter_btrbk, and it's from the Btrbk manual (section 1, in case you were wondering π). it's a lil ssh command filter script and honestly? it's giving bodyguard energy. let's get into it.
β¨ NAME β¨
ssh_filter_btrbk β an ssh command filter script for btrbk. that's it, that's the name. iconic. periodt.
πΈ SYNOPSIS πΈ
ssh_filter_btrbk.sh [-s|--source] [-t|--target] [-d|--delete]
[-i|--info] [--snapshot] [--send] [--receive]
[-p|--restrict-path <path>] [-l|--log] [--sudo]
look at her. all those flags. so much range π
π¦ DESCRIPTION π¦
so ssh_filter_btrbk.sh does exactly what it says on the tin: it restricts SSH commands to only the commands that btrbk actually uses. nothing more, nothing less. no cap.
here's the vibe: it peeks at the SSH_ORIGINAL_COMMAND environment variable (which sshd sets for you, tysm sshd π«Ά) and it will only run that command if it contains commands used by btrbk. otherwise? nope. rejected. blocked. not today.
which commands get the green light is decided by the --source, --target, --delete and --info options. you're the one choosing.
and these ones are always allowed, no matter what:
btrfs subvolume showβ and heads up, this one is NOT affected by--restrict-pathbtrfs subvolume listβ also NOT affected by--restrict-pathreadlinktest -dβ but only if thecompat busyboxconfiguration option is setcat /proc/self/mountinfo- pipes through
gzip,pigz,bzip2,pbzip2,bzip3,xz,lzop,lz4,zstd(that's thestream_compresssituation) - pipes through
mbuffer(that'sstream_bufferandrate_limit)
and here's an example line for /root/.ssh/authorized_keys on a backup target host, so you can copy it exactly:
command="ssh_filter_btrbk.sh --target --delete --restrict-path /mnt/btr_backup",restrict ssh-rsa AAAAB3NzaC1...hwumXFRQBL btrbk@example.org
chef's kiss. she's beautiful π
π OPTIONS π
-s,--sourceβ allows the commands for a backup source:btrfs subvolume snapshotandbtrfs send. it's literally just shorthand for--snapshot --send. slay.-t,--targetβ allows the commands for a backup and archive target:btrfs receiveandmkdir.-d,--deleteβ allows the commands for subvolume deletion:btrfs subvolume delete. so like, this gets used for the backup source ifsnapshot_preserve_dailyis not set to βallβ, and for backup targets iftarget_preserve_dailyis not set to βallβ. got it? got it π-i,--infoβ allows the informative commands:btrfs subvolume find-newandbtrfs filesystem usage. this is whatbtrbk infoand thediffcommands use.--snapshotβ allows the btrfs snapshot command:btrfs subvolume snapshot.--sendβ allows the btrfs send command:btrfs send.--receiveβ allows the btrfs receive command:btrfs receive.-p,--restrict-path <path>β restricts commands to<path>. but real talk:btrfs subvolume showandbtrfs subvolume listare NOT affected by this option, so don't be surprised.- also, it's literally not possible to restrict commands to exact subvolume names, because
btrfs-receive(8)takes a<path>as its argument β and that's a directory, not including the subvolume file name that's about to be created, since that name is encoded inside the send-stream. iykyk.
- also, it's literally not possible to restrict commands to exact subvolume names, because
-l,--logβ logs the ACCEPT and REJECT messages to the system log. receipts! π--sudoβ allows btrfs commands to be called viasudo. turn this on if you've gotbackend btrfs-progs-sudoin your btrbk configuration file.
π AVAILABILITY π
want more? go check out the btrbk project page at https://digint.ch/btrbk/ for all the further details bestie π«Ά
π₯ SEE ALSO π₯
btrbk(1), btrbk.conf(5), btrfs(8) β the whole friend group, go say hi π
π AUTHOR π
Axel Burri axel@tty0.ch β ty for your service king π
ok that's the whole page, no skips, no cuts. every flag, every command, every caveat, all of it π
and that's a wrap on the btrbk manual for ssh_filter_btrbk(1) β this one came straight from Btrbk 0.32.7, dated 2026-07-19. love that for us. stay safe out there and always restrict your ssh commands, mwah πβ¨
π¦ where this page comes from
- arch rolling: btrbk 0.32.7-1 Β· GPL-3.0-or-later
- fedora 43: btrbk 0.32.7-1.fc43 Β· GPL-3.0-or-later
- fedora 44: btrbk 0.32.7-1.fc44 Β· GPL-3.0-or-later
- nixos 26.05: btrbk 0.32.7
- nixpkgs unstable: btrbk 0.32.7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms