Inveneo's picture

I just noticed my backups have been failing for a while.  When I run tklbam-backup, I get this:

root@waldorf /home/critchie# tklbam-backup
Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 266, in <module>
  File "/usr/bin/tklbam-backup", line 237, in main
    b = backup.Backup(conf)
  File "/usr/lib/tklbam/", line 251, in __init__
    self._create_extras(extras_paths, profile_paths, conf)
  File "/usr/lib/tklbam/", line 235, in _create_extras
  File "/usr/lib/tklbam/", line 394, in backup
    mysql2fs(mysqldump_fh, myfs, **kws)
  File "/usr/lib/tklbam/", line 217, in mysql2fs
    MyFS_Writer(outdir, limits).fromfile(fh, callback)
  File "/usr/lib/tklbam/", line 213, in fromfile
    assert _match_name(statement) ==
I'm not sure what's happening, but here is around line 213:
	elif statement.startswith("INSERT INTO"):
                if not database or not table:
                assert _match_name(statement) ==
def mysql2fs(fh, outdir, limits=[], callback=None):
    MyFS_Writer(outdir, limits).fromfile(fh, callback)
Any ideas?
Inveneo's picture


I commented out that assertion and the backup seems to be running now.
It seems that  tklbam-backup does not like it when you have a trigger that performs an action on a table other than the table the trigger is installed on.
So in my case, this line failed:
assert _match_name(statement) ==
  • is:  network_radios
  • statement is:  INSERT INTO radios_radios SELECT...
Indeed, in my database the table network_radios has a trigger that does an insert into another table named radios_radios.

Add new comment