【TiDB Usage Environment】
Production Environment
【TiDB Version】
v4.0.12
【Encountered Issues】
1. Using dumpling for logical backup of a single table, the backup data includes the creation statements for the database and data table;
2. When using tidb-lightning, you need to specify the backup directory for restoration, and during restoration, it will recreate the database and data table;
3. Now, I want to restore to a different database instead of the original one. How should I proceed?
Just like MySQL. If you want to switch databases, after exporting with Dumpling, try modifying the database in the create database schema to the one you want.
Buddy, this doesn’t seem to work. There’s no error during execution, but no new database is created during recovery, and there are no corresponding tables either.
Hello, does this configuration have any version requirements for tidb-lightning? I didn’t see this configuration item mentioned in the official documentation.
There were no errors, and the database was created successfully, but the data was still restored to the original database and has nothing to do with the newly created one.
Well, that’s one way to do it, but you still have to manually operate it once after restoring. What I’m thinking is to directly specify another database during the restoration.