TiDB version 7.10, the data in the database is synchronized from MySQL using the DM tool.
Steps: Created 3 databases named in the format han_xxxx, created a table in each database, and inserted a row of data. Used br backup full for backup, but encountered an error during restore: [BR:Restore:ErrRestoreNotFreshCluster] cluster is not fresh.
When the BR tool performs a recovery operation, it requires that the target cluster does not have the related databases and tables to avoid overwriting existing data.
Therefore, when using BR for recovery, the administrator must first ensure that it is a new cluster or sufficiently “clean” so that no identical databases and tables exist.
A check for an empty cluster has been added before full recovery, and by default, recovery to a non-empty cluster is not supported. If you want to force recovery, you can use --filter to specify the corresponding table name.
I made a mistake. The backup command I used is this:
tiup br backup full --pd “172.16.0.26:2379” --filter “han_*.*” --storage “local:///tidb/backup/han-date +%Y-%m-%d” --log-file backup.log
Sorry, sorry.