Forum archive
TKLBAM kills MySQL
Can't run TKLBAM on my LAMP 16.1 server...it kills MySQL (well MariaSQL). LAMP server with WordPress installed (backs up the WordPress MySQL fine...it fails on the MySQL db Backup)
I added a swapfile and ran top while TKLBAM was running. Plenty of CPU, plenty of disk, plenty of RAM free when it fails. Not a resource issue. It literally kills MySQL while it is taking a snapshot. Here is as far as it got:
I added a swapfile and ran top while TKLBAM was running. Plenty of CPU, plenty of disk, plenty of RAM free when it fails. Not a resource issue. It literally kills MySQL while it is taking a snapshot. Here is as far as it got:
database: mysql
table: mysql/column_stats
table: mysql/columns_priv
table: mysql/db
table: mysql/event
table: mysql/func
table: mysql/gtid_slave_pos
table: mysql/help_category
table: mysql/help_keyword
table: mysql/help_relation
table: mysql/help_topic
table: mysql/host
table: mysql/index_stats
table: mysql/innodb_index_stats
table: mysql/innodb_table_stats
table: mysql/plugin
table: mysql/proc
table: mysql/procs_priv
table: mysql/proxies_priv
table: mysql/roles_mapping
table: mysql/servers
table: mysql/table_stats
table: mysql/tables_priv
table: mysql/time_zone
table: mysql/time_zone_leap_second
table: mysql/time_zone_name
table: mysql/time_zone_transition
table: mysql/time_zone_transition_type
table: mysql/user
table: mysql/general_log
table: mysql/slow_log
table: mysql/transaction_registry
Traceback (most recent call last):
File "/bin/tklbam-backup", line 443, in main
opt_resume, True, dump_path if dump_path else "/")
File "/usr/lib/tklbam/backup.py", line 237, in __init__
self._create_extras(extras_paths, profile_paths, backup_conf)
File "/usr/lib/tklbam/backup.py", line 183, in _create_extras
limits=conf.overrides.mydb, callback=mysql.cb_print()) if self.verbose else None
File "/usr/lib/tklbam/mysql.py", line 570, in backup
mna.stop()
File "/usr/lib/tklbam/mysql.py", line 729, in stop
self.command.wait()
File "/usr/lib/python2.7/dist-packages/command.py", line 299, in wait
self._child.wait()
File "/usr/lib/python2.7/dist-packages/popen4.py", line 204, in wait
pid, sts = os.waitpid(self.pid, 0)
KeyboardInterrupt
Thanks for reporting Tim and thanks for checking RAM (that would have been my first guess).
Firstly, do you mean v15.1 or v16.0 (there is no LAMP v16.1 yet)?
Also, out of interest, does this DB come from a previous TurnKey server (i.e. migrated via TKLBAM)?
We've had a somewhat similar issue reported previously (which AFAIK was never properly resolved). The user experiencing it had been using TKLBAM for years with this DB (and migrating between many TurnKey versions) and it turned out that there were a load of old, no longer supported config that only appeared to be causing issues under certain scenarios. However, even after tidying that up, there were still issues. He shared a sanitised copy of the DB dump (IIRC only user emails and passwords removed) and I restored that to a local VM (I didn't even give it a lot of and couldn't reproduce the issue. So in the end, we just disabled TKLBAM backing up the DB and created a TKLBAM hook to dump the DB to a SQL file pre backup (then just backup the SQL as a SQL dump file).
It's not ideal and I'd really love to understand what the actual issue is/was but without access to the data/config that can reproduce it locally, it's near impossible.
I don't know for a fact (and actually this is total speculation) but my suspicion is that it's something to do with character encoding. I suspect that there is some encoding mismatch (between MySQL and TKLBAM) somewhere that is causing a character that can't be properly interpreted and/or converted between different encodings. MySQL chokes and the whole thing falls over...
So if you're open to sharing your data/database/config/etc, then I'm more than happy to see if I can reproduce it. And if I can, I'm confident that we can develop a fix... Please feel free to send it through to me (you've got my email).