First off, the solution to this problem is to modify /etc/tklbam/hooks.d/fixclock by adding:

from typing import Optional

And now the problem:

root@core ~# tklbam-backup
Implicit --resume: Detected a rerun of an aborted backup session
                   You can disable this with the --disable-resume option

HOOK /etc/tklbam/hooks.d/maria-db-changes :: op=backup state=pre pwd=/root ::
[maria-db-changes] INFO: nothing to do when backing up
Traceback (most recent call last):
  File "/etc/tklbam/hooks.d/fixclock", line 82, in <module>
    def is_container() -> Optional[str]:
NameError: name 'Optional' is not defined
Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 510, in <module>
  File "/usr/bin/tklbam-backup", line 439, in main
  File "/usr/lib/tklbam/", line 78, in pre
  File "/usr/lib/tklbam/", line 73, in _run
    _run_hooks(self.LOCAL_HOOKS, (, state))
  File "/usr/lib/tklbam/", line 42, in _run_hooks
    (fpath, " ".join(args), e.exitcode))
hooks.HookError: `/etc/tklbam/hooks.d/fixclock backup pre` non-zero exitcode (1)
root@core ~# turnkey-version
root@core ~# ntpdate -u
2024-03-05 22:21:15.829279 (+0000) -0.006671 +/- 0.000235 s2 no-leap


Jeremy Davis's picture

Firstly I misread your email and started speaking to the issue...

Regardless I thought I tested the latest release (the one where I added maria-db-changes hook) fairly thoroughly before building and releasing?! So I'm not sure how I missed that. Anyway, that's irrelevant as clearly I did!

Thanks for reporting it and bonus points for providing the fix! I've added a bug on our tracker.

Jeremy Davis's picture

This issue is now fixed. Obviously for anyone who has applied the above fix already, no need to update to the new version. But for anyone else who has this issue, to update to the fixed tklbam version:

apt update
apt install tklbam

Add new comment