The ibdata1 file has increased to ~2TB and leaves only a few GBs free space in the same disk (this is because I forgot to turn on innodb_file_per_table
, before it was too late)
From what I have read in What is the best way to reduce the size of ibdata in mysql? the only way to reduce ibdata1 is to:
backup -> delete ibdata1 -> restore database.
Now, since the ibdata1 is so large, what's the best way to do it?
And how much time will it take?
I have two other free disks of 2TB size available which can be used for backup.
My thought is as follows:
mysqldump current database into disk-x
restore from disk-x to disk-y
delete original ibdata1 in disk-z
Is this good way and how long will it take?