Skip to content

backupccl: allow cluster restore from different tenant#79427

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
stevendanna:allow-cluster-restores
Apr 5, 2022
Merged

backupccl: allow cluster restore from different tenant#79427
craig[bot] merged 1 commit intocockroachdb:masterfrom
stevendanna:allow-cluster-restores

Conversation

@stevendanna
Copy link
Copy Markdown
Collaborator

@stevendanna stevendanna commented Apr 5, 2022

This removes a prohibition for cluster restores with mismatched tenant
IDs since we believe they are now correct as of #73831

This allows users to take a cluster backup in a tenant and restore it
into another tenant.

The new tenant_settings table needs special care since it may exist in
the source tenant but not the target tenant when the source tenant is
the system tenant.

In this change, we throw an error in the case of a non-empty
tenant_settings table being restored into a non-system tenant. This is
a bit user-unfriendly since we detect this error rather late in the
restore process.

Release note: None

Jira issue: CRDB-14844

@stevendanna stevendanna requested review from a team and adityamaru and removed request for a team April 5, 2022 14:11
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@stevendanna stevendanna requested a review from dt April 5, 2022 14:12
@stevendanna stevendanna force-pushed the allow-cluster-restores branch 3 times, most recently from 5de9d62 to 275686d Compare April 5, 2022 16:23
This removes a prohibition for cluster restores with mismatched tenant
IDs since we believe they are now correct as of cockroachdb#73831

This allows users to take a cluster backup in a tenant and restore it
into another tenant.

The new tenant_settings table needs special care since it may exist in
the source tenant but not the target tenant when the source tenant is
the system tenant.

In this change, we throw an error in the case of a non-empty
tenant_settings table being restored into a non-system tenant. This is
a bit user-unfriendly since we detect this error rather late in the
restore process.

Release note: None
@stevendanna stevendanna force-pushed the allow-cluster-restores branch from 275686d to 46c04e2 Compare April 5, 2022 17:08
@stevendanna
Copy link
Copy Markdown
Collaborator Author

bors r=dt

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 5, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 5, 2022

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants