Allow BR restore to a different schema or table name
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
While BR restore allows to restore only specific schemas and/or tables, it doesn't allow to restore to a different schema/table name.
This is useful when you want to restore a copy of a dataset but want to leave the existing schema alone (it is being used).
**Describe the feature you'd like:**
Ability to rename restored schemas/tables into different name.
`original_schema -> (tiup br restore db --db original_schema --target_db new_schema) -> new_schema`
Could also be something similar to: https://docs.pingcap.com/tidb/stable/tidb-lightning-data-source#rename-databases-and-tables
**Describe alternatives you've considered:**
Alternative is using dumpling/lightning but this is very slow when dataset is multiple TB.
**Teachability, Documentation, Adoption, Migration Strategy:**
Contributor guide
Research direction
Start with the tiup br restore path described in the request and review how schema and table selection are currently specified. Compare the requested behavior with the linked TiDB Lightning rename-databases-and-tables documentation. Done means BR can restore selected data under a different schema or table name while leaving the existing schema untouched.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100