BTRACEBACK(1)
π BTRACEBACK π
okay bestie, gather round, because this one is the little script that catches your Bacula daemons when they fall π
it lives in the "Network backup, recovery and verification" section of the manual, and it is literally just a wrapper script around gdb and bsmtp.
β¨ NAME β¨
btraceback β a wrapper script around gdb and bsmtp π«Ά
πΈ SYNOPSIS πΈ
btraceback /path/to/binary pid
that's it. that's the whole vibe. two args: where the binary is, and which pid you're snooping on π«
π¦ DESCRIPTION π¦
so btraceback is a wrapper shell script around the gdb debugger (or dbx on Solaris systems, hi Solaris besties π) and bsmtp, and it exists purely for debugging purposes. it's giving backstage pass to your process's soul. no cap.
π USAGE π
btraceback gets called by the exception handlers of the Bacula daemons during a crash β like, when things go boom, this is the girl who shows up with a notepad π
you can also call it interactively to view the current state of the threads belonging to a process, but lowkey this is not recommended unless you're actively trying to debug a problem (see below, babe π).
π NOTES π
okay so, important stuff, listen up:
- for this to actually work properly, debugging symbols must be available to the debugger on the system, and
gdb, ordbx(on Solaris systems), must be available in the$PATH. no symbols, no stack trace, that's just the rules β - if the Director or Storage daemon runs under a non-root uid, you will probably need to modify the
btracebackscript to elevate privileges for the call togdb/dbx, so it has the proper permissions to debug when called by the daemon. like, permissions are the whole plot here π - although Bacula's use of
btracebackwithin its exception handlers is always safe, manual or interactive use ofbtracebackis subject to the same risks than live debugging of any program β which means it could cause Bacula to crash under rare and abnormal circumstances π
consequently, we do not recommend manual use of btraceback in production environments unless it is required for debugging a problem. bestie. i am begging you. do not do it in prod for funsies π
π ENVIRONMENT π
btracback relies on $PATH to find the debugger. that's the whole environment section, she's short and she's iconic π
π FILES π
/usr/libexec/bacula/btracebackβ the script itself. the main character π/usr/sbin/btracebackβ a symbolic link to/usr/libexec/bacula/btracebackπ/etc/bacula/scripts/btraceback.gdbβ the GDB command batch used to output a stack trace π
π AUTHOR π
this manual page was written by Lucas B. Cohen <lbc@members.fsf.org> π«Ά ty for your service king
β SEE ALSO β
this man page document is released under the BSD 2-Clause license πβ¨
and that's the page, bestie!! brought to you by Kern Sibbald, dated 6 December 2009 β yes she's an elder but she still ate π go read bsmtp(1) next, ily, bye π¦πΈ
π¦ where this page comes from
- debian bookworm: bacula-common 9.6.7-7
- debian trixie: bacula-common 15.0.3-3
- ubuntu jammy: bacula-common 9.6.7-5~22.04.1
- ubuntu noble: bacula-common 13.0.4-1build3
- ubuntu questing: bacula-common 15.0.3-3ubuntu2
- ubuntu resolute: bacula-common 15.0.3-5
- ubuntu stonking: bacula-common 15.0.3-5ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms