Comment 4 for bug 1551272

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Just for follow-up, if you remove the .ibd file from /tmp/foo/test/t1.ibd and keep t1.ibd inside mysql datadir(after copy-back):

2016-03-01 17:07:51 7f97ea6e67c0 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
2016-03-01 17:07:51 22339 [ERROR] InnoDB: A link file was found named './test/t1.isl' but the linked tablespace '/tmp/foo/test/t1.ibd' could not be opened.
2016-03-01 17:07:51 22339 [Note] InnoDB: The InnoDB data dictionary table SYS_DATAFILES for tablespace ID 6 was updated to use file ./test/t1.ibd.

It will refer to new path as specified.

But for the original recovery process t1.ibd file from backup directory should be copied to original path specified in t1.isl, prior to copy-back or as part of copy-back process, with special option as suggested by @Sergei.