mysql - InnoDB: Attempted to open a previously opened tablespace with innobackupex -


innobackupex , docker

i trying clone mysql 5.6 slave innobackupex 2.4.8 . slave runs inside docker mysql5.6 container. innobackupex tool ist started on host , provide dsn string tool data directory of container on host.

streaming backup

the database quite large (60gb) , host has limited space. move data new host more space. reason stream backup on ssh new host, run new docker container copied data.

the backup worked fine first time. when running second time, receive following error:

innodb: attempted open opened tablespace. previous  tablespace test_db/cars @ filepath: ./test_db/cars.ibd uses space  id: 3. cannot open filepath: ./mysql/slave_relay_log_info.ibd  uses same space id. 

innobackupex command

this command use

sudo innobackupex --slave-info --safe-slave-backup \   --user=root --host=127.0.0.1 --port=3306 --protocol=tcp \   --datadir=/var/lib/docker/volumes/mysqlslave_data/_data \   --databases="test_db mysql" --stream=tar ./ | ssh newhost \     "cat - > /home/user/slave_backup.tar"  

i did not add --slave-info --safe-slave-backup flags first time , suspect cause of problem, mysql server try backup slave of different master.

the docker container holding slave not show errors , can restarted. not affected, innobackupex tool shows error.

question?

how address issue , how can reset previous state without loosing data?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -