Details
-
Bug
-
Status: On Hold
-
Medium
-
Resolution: Unresolved
-
8.0.x, Not 2.4.x
-
None
-
None
Description
When I follow https://www.percona.com/doc/percona-xtrabackup/8.0/xtrabackup_bin/partial_backups.html, and restore whole backup made with --databases option to skip some dbs, I end up with broken DD as follows (I had originally databases db1, db2 and db3):
xtrabackup --backup --target-dir=backups/2 --databases='db2 db3 mysql sys performance_schema' --user=root xtrabackup --prepare --target-dir=backups/2 --databases='db2 db3 mysql sys performance_schema' --user=root xtrabackup --copy-back --target-dir=backups/2 chown -R mysql.mysql /var/lib/mysql # ls -ld /var/lib/mysql/db* drwxr-x--- 2 mysql mysql 4096 May 15 17:36 /var/lib/mysql/db2 drwxr-x--- 2 mysql mysql 4096 May 15 17:36 /var/lib/mysql/db3
After starting the service:
mysql> show tables in db1; +---------------+ | Tables_in_db1 | +---------------+ | t1 | +---------------+ 1 row in set (0.00 sec) mysql> select * from db1.t1; ERROR 1812 (HY000): Tablespace is missing for table `db1`.`t1`. mysql> drop database db1; ERROR 3679 (HY000): Schema directory './db1/' does not exist mysql> show databases; +--------------------+ | Database | +--------------------+ | db1 | | db2 | | db3 | | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 7 rows in set (0.00 sec)
Tested on:
# xtrabackup --version
xtrabackup: recognized server arguments: --datadir=/var/lib/mysql --tmpdir=/tmp
xtrabackup version 8.0.11 based on MySQL server 8.0.18 Linux (x86_64) (revision id: 486c270)
Also, manual section:
System database can be created with:
$ sudo mysql_install_db --user=mysql
does not apply to MySQL 8.0 anymore.