Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: RESTORE恢复异常DDL job rollback, error msg: Invalid DDL job%!
[Test Environment] Testing environment
[TiDB Version] v6.3.0
[Encountered Problem: Symptoms and Impact]
Backup data using BACKUP DATABASE * TO 'local:///data/BACKUP/2024/02/29/';
works fine.
However, restoring to another cluster of the same version results in an error:
Restore command: RESTORE DATABASE * FROM 'local:///data/BACKUP/2024/02/29/';
Error: ERROR 8125 (HY000): Restore failed: [ddl:8204]DDL job rollback, error msg: Invalid DDL job%!(EXTRA string=table, model.SchemaState=public)
[Attachments: Screenshots/Logs/Monitoring]
New cluster phenomenon: The database is created, but only a few tables (not all) are restored.
This feature might not be reliable.
Yes, I saw that the BACK command was also an experimental feature before. In this case, it might be necessary to raise an issue on GitHub.
Yes, it is best to use non-experimental features in production systems. Experimental features should only be used during validation and learning.
Check if there are any unfinished DDL jobs?
First of all, this error is likely a bug in the version. If it’s a test environment, you can check whether there are any ongoing DDL job tasks in the downstream cluster. Since the Restore command is driven by the TiDB server in the command line terminal, you can find more detailed information about this restore execution error in the tidb.log.
BR is still more reliable.
Check the DDL logs to see which table’s creation statement is abnormal?
This tool still has issues.