Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Restore tenant from backup and archive #74

Merged
merged 23 commits into from
Sep 27, 2023

Conversation

powerfooI
Copy link
Collaborator

Summary

  • Restore tenant from backup and archive
  • Restore tenant to Primary or Standby
  • Cancel tenant and recycle its resource

Solution Description

  • Create a Tenant CR with non-nil source.restore field, OBTenant controller will initialize the CR to restoring status
  • OBTenant Controller create a belonging resource OBTenantRestore to process restore job. OBTenant watch the Restore CR to finish.
  • When restore job finish, CR will activate the standby or just replaying log for it according to which TenantRole it was specified to restore as. ( PRIMARY/STANDBY )

powerfooI and others added 21 commits September 20, 2023 20:40
fix tenant add replica, optimize resource update with retry
…estore

Conflicts:
	Makefile
	api/constants/restore.go
	api/v1alpha1/obtenant_types.go
	api/v1alpha1/obtenant_webhook.go
	api/v1alpha1/obtenantrestore_types.go
	cmd/main.go
	config/crd/bases/oceanbase.oceanbase.com_obtenantrestores.yaml
	config/crd/bases/oceanbase.oceanbase.com_obtenants.yaml
	pkg/const/status/tenantstatus/obtenant_status.go
	pkg/controller/obtenantoperation_controller.go
	pkg/controller/obtenantrestore_controller.go
	pkg/oceanbase/const/sql/restore.go
	pkg/oceanbase/operation/restore.go
	pkg/oceanbase/test/restore_test.go
	pkg/resource/obtenant_manager.go
	pkg/resource/obtenantrestore_manager.go
	pkg/resource/obtenantrestore_task.go
	pkg/resource/obzone_task.go
	pkg/resource/template_manager.go
	pkg/task/const/flow/name/task_flow_names.go
	pkg/task/const/task/name/restore.go
	pkg/task/const/task/name/task_names.go
	pkg/task/obtenant_flow.go
deploy/tenant.yaml Show resolved Hide resolved
distribution/oceanbase/build.sh Outdated Show resolved Hide resolved
pkg/oceanbase/operation/restore.go Outdated Show resolved Hide resolved
pkg/resource/obtenantrestore_manager.go Outdated Show resolved Hide resolved
pkg/resource/obtenantrestore_task.go Show resolved Hide resolved
@powerfooI powerfooI merged commit 5548768 into oceanbase:2.0.x_dev Sep 27, 2023
2 checks passed
@powerfooI powerfooI deleted the feature/tenant-restore branch October 26, 2023 08:34
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.

2 participants