[MDEV-29868] Can not restore table after partial backup Created: 2022-10-24  Updated: 2022-10-27

Status: Open
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.6.9
Fix Version/s: 10.3

Type: Bug Priority: Major
Reporter: Timofey Turenko Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File partial_backup.sh    
Issue Links:
Relates

 Description   

Create tables e.g. table1, table2, table10, make partial backup:

sudo mariadb-backup --backup -utest_user -p**** --target-dir=backup --tables=table1

stop server, cleanup /var/lib/mysql, run mariadb-install-db, restart server, re-create users

Create empty table, discard its tables space: `alter table table1 discard tablespace;`

Try to restore `table1`:

sudo mariadb-backup --prepare  --target-dir=backup --export
sudo cp backup/test/table1.ibd /var/lib/mysql/test/
sudo cp backup/test/table1.cfg /var/lib/mysql/test/
sudo chown mysql:mysql /var/lib/mysql -R

Try to import tablespace:

MariaDB [test]> alter table table1 import tablespace;
ERROR 1808 (HY000): Schema mismatch (Column s precise type mismatch, it's 0X8100F in the table and 0X2D100F in the tablespace meta file)

what do `0X8100F` and `0X2D100F` ?

Documentation:

Should mariadb-backup tool do partial backup restore automatically?


Generated at Thu Feb 08 10:11:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.