As reported by Chris on the forums there is a bug in TKLBAM when migrating data from v16.x (or earlier) to v17.x (or newer).
The specific error stacktrace looks like this:
Error 1050 (42S01) at line 1453: table 'user' already exists Traceback (most recent call last): File "/usr/bin/tklbam-restore", line 554, in <module> main() File "/usr/bin/tklbam-restore", line 530, in main restore.database() File "/usr/lib/tklbam/restore.py", line 76, in database limits=self.limits.mydb, callback=mysql.cb_print(), simulate=self.simulate) File "/usr/lib/tklbam/mysql.py", line 591, in restore fs2mysql(mysql_fh, myfs, **kws) File "/usr/lib/tklbam/mysql.py", line 524, in fs2mysql MyFS_Reader(myfs, limits, skip_extended_insert, add_drop_database).tofile(fh, callback) File "/usr/lib/tklbam/mysql.py", line 509, in tofile database.tofile(fh, callback) File "/usr/lib/tklbam/mysql.py", line 349, in tofile table.tofile(fh) File "/usr/lib/tklbam/mysql.py", line 428, in tofile print >> fh, Template(self.TPL_CREATE).substitute(init=self.sql_init) IOError: [Errno 32] Broken pipe
It appears to be related to MDEV-22127. The workaround is to run these commands before running the restore:
mysql -e "DROP TABLE IF EXISTS 'mysql'.'global_priv';" mysql -e "DROP VIEW IF EXISTS 'mysql'.'user';"
As some may realise, the above commands are destructive (they delete the user management tables) so be careful running them on a server where you have data that you don't want to loose. Generally if migration that won't be an issue, but if there is any DB data you wish to protect, please at least do a local mysqldump before restoring.
Also, please note that these steps ARE NOT required when restoring v17 data to v17. That should "just work".
As reported by Chris on the forums there is a bug in TKLBAM when migrating data from v16.x (or earlier) to v17.x (or newer).
The specific error stacktrace looks like this:
It appears to be related to MDEV-22127. The workaround is to run these commands before running the restore:
As some may realise, the above commands are destructive (they delete the user management tables) so be careful running them on a server where you have data that you don't want to loose. Generally if migration that won't be an issue, but if there is any DB data you wish to protect, please at least do a local mysqldump before restoring.
Also, please note that these steps ARE NOT required when restoring v17 data to v17. That should "just work".