As you see the .ibd file was copied to path relative to backup directory itself, not to relative path to datadir of MySQL:
[shahriyar.rzaev@qaserver-02 full]$ ls
2017-12-05_10-12-27 relative_path
If you start server after that:
2017-12-05T10:18:16.954937Z 0 [ERROR] InnoDB: Failed to find tablespace for table `sysbench_test_db`.`sbtest20` in the cache. Attempting to load the tablespace with spac
e id 72
2017-12-05T10:18:16.955015Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955023Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955038Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_path/out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955042Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955045Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955050Z 0 [ERROR] InnoDB: A link file was found named './out_rel_ts1.isl' but the linked tablespace '../relative_path/out_rel_ts1.ibd' could not be o
pened read-only.
2017-12-05T10:18:16.955056Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955059Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955063Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_path/out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955069Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955072Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955075Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './out_rel_ts1.ibd' OS error: 71
2017-12-05T10:18:16.955079Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2017-12-05T10:18:16.955082Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2017-12-05T10:18:16.955087Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `out_rel_ts1`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
10:18:16 UTC - mysqld got signal 11 ;
Hi,
Created general tablespace with relative path:
create tablespace out_rel_ts1 add datafile '../relative_ path/out_ rel_ts1. ibd' engine=innodb
I see out_rel_ts1.isl and out_rel_ts1.ibd file Inside datadir:
[shahriyar. rzaev@qaserver- 02 full]$ pwd .rzaev/ XB_TEST/ backup_ dir/ps_ 5_7_x_2_ 4/cycle1/ full
/home/shahriyar
[shahriyar. rzaev@qaserver- 02 full]$ ls 2017-12- 05_10-12- 27/ binlog_ pos_innodb xtrabackup_logfile checkpoints xtrabackup_ slave_info binlog_ info xtrabackup_info
backup-my.cnf ibdata1 ibtmp1 out_rel_ts1.isl performance_schema test xtrabackup_
full_backup.stream ib_logfile0 mysql out_ts1.ibd sys ts1.ibd xtrabackup_
ib_buffer_pool ib_logfile1 out_rel_ts1.ibd out_ts1.isl sysbench_test_db xtrabackup_
Trying to copy-back:
/home/shahriyar .rzaev/ XB_TEST/ server_ dir/target/ percona- xtrabackup- 2.4.x-debug/ bin/xtrabackup --copy-back --slave-info --no-version-check --core-file --parallel=10 --throttle=40 --check-privileges --keyring- file-data= /home/shahriyar .rzaev/ XB_TEST/ server_ dir/PS041217- percona- server- 5.7.20- 18-linux- x86_64- debug/mysql- keyring/ keyring --target- dir=/home/ shahriyar. rzaev/XB_ TEST/backup_ dir/ps_ 5_7_x_2_ 4/cycle1/ full/2017- 12-05_10- 12-27 --datadir= /home/shahriyar .rzaev/ XB_TEST/ server_ dir/PS041217- percona- server- 5.7.20- 18-linux- x86_64- debug/node1 .rzaev/ XB_TEST/ server_ dir/PS041217- percona- server- 5.7.20- 18-linux- x86_64- debug/node1/ out_rel_ ts1.isl path/out_ rel_ts1. ibd
...
171205 10:18:07 [06] Copying ./out_rel_ts1.isl to /home/shahriyar
171205 10:18:10 [04] Copying ./out_rel_ts1.ibd to ../relative_
...
As you see the .ibd file was copied to path relative to backup directory itself, not to relative path to datadir of MySQL:
[shahriyar. rzaev@qaserver- 02 full]$ ls
2017-12-05_10-12-27 relative_path
If you start server after that:
2017-12- 05T10:18: 16.954937Z 0 [ERROR] InnoDB: Failed to find tablespace for table `sysbench_ test_db` .`sbtest20` in the cache. Attempting to load the tablespace with spac 05T10:18: 16.955015Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation. 05T10:18: 16.955023Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified. 05T10:18: 16.955038Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_ path/out_ rel_ts1. ibd' OS error: 71 05T10:18: 16.955042Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation. 05T10:18: 16.955045Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified. 05T10:18: 16.955050Z 0 [ERROR] InnoDB: A link file was found named './out_rel_ts1.isl' but the linked tablespace '../relative_ path/out_ rel_ts1. ibd' could not be o 05T10:18: 16.955056Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation. 05T10:18: 16.955059Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified. 05T10:18: 16.955063Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: '../relative_ path/out_ rel_ts1. ibd' OS error: 71 05T10:18: 16.955069Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation. 05T10:18: 16.955072Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified. 05T10:18: 16.955075Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './out_rel_ts1.ibd' OS error: 71 05T10:18: 16.955079Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation. 05T10:18: 16.955082Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified. 05T10:18: 16.955087Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `out_rel_ts1`. Please refer to http:// dev.mysql. com/doc/ refman/ 5.7/en/ innodb- troubleshooting -datadict. html for how to resolve the issue.
e id 72
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
pened read-only.
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
2017-12-
10:18:16 UTC - mysqld got signal 11 ;