Forum archive
tklbam-backup failing due to fixclock problem.
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 ::
TKLBAM_RESTORE_PROFILE_ID:
[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>
main()
File "/usr/bin/tklbam-backup", line 439, in main
hooks.backup.pre()
File "/usr/lib/tklbam/hooks.py", line 78, in pre
self._run("pre")
File "/usr/lib/tklbam/hooks.py", line 73, in _run
_run_hooks(self.LOCAL_HOOKS, (self.name, state))
File "/usr/lib/tklbam/hooks.py", 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
turnkey-core-18.0-bookworm-amd64
root@core ~# ntpdate -u 192.168.3.254
2024-03-05 22:21:15.829279 (+0000) -0.006671 +/- 0.000235 192.168.3.254 s2 no-leap
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.