-
Notifications
You must be signed in to change notification settings - Fork 501
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
restore database from cloud #160
Conversation
* add readiness probes for tidb service
What's the plan to make this scale?
|
f164b5b
to
1969b98
Compare
secret: | ||
secretName: {{ .Values.clusterName }}-restore-secret | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line.
requests: | ||
storage: {{ .Values.restore.storage }} | ||
storageClassName: {{ .Values.restore.storageClassName }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
app.kubernetes.io/name: {{ template "chart.name" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/instance: {{ .Values.clusterName }} | ||
app.kubernetes.io/component: restore-secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app.kubernetes.io/component: restore-secret | |
app.kubernetes.io/component: restore |
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.clusterName }}-restore-secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: {{ .Values.clusterName }}-restore-secret | |
name: {{ .Values.clusterName }}-restore |
credentials.json: {{ .Values.restore.gcp.credentialsData }} | ||
{{- end }} | ||
user-password: {{ .Values.restore.password | b64enc | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
@@ -5,7 +5,7 @@ host=`echo {{ .Values.clusterName }}_TIDB_SERVICE_HOST | tr '[a-z]' '[A-Z]'` | |||
mkdir -p /data/${dirname}/ | |||
cp /savepoint-dir/savepoint /data/${dirname}/ | |||
|
|||
mydumper \ | |||
./mydumper \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change mydumper
to ./mydumper
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new version image: pingcap/tidb-cloud-backup:latest
will base pingcap/tidb-enterprise-tools:latest
, the mydumper
and loader
's path change.
look at:
tennix/tidb-cloud-backup#1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, please use an absolute path.
-p ${TIDB_PASSWORD} \ | ||
-P 4000 \ | ||
{{ .Values.restore.options }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add new line
set -euo pipefail | ||
|
||
dirname=`date +%Y-%m-%dT%H%M%S`-${MY_POD_NAME} | ||
mkdir -p /data/${dirname}/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
difine /data/${dirname}/
as a var.
--destDir=/data/${dirname} | ||
|
||
dataDir=/data/${dirname}/{{ .Values.restore.gcp.srcDir }} | ||
./loader \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./loader \ | |
loader \ |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@gregwebs I think it's a long-term plan to make |
@gregwebs the plan is:
if any step failed then the job is failed and quit |
/run-e2e-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
secretKeyRef: | ||
name: {{ .Values.clusterName }}-restore-secret | ||
key: user-password | ||
restartPolicy: OnFailure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is here a second time.
host=`echo {{ .Values.clusterName }}_TIDB_SERVICE_HOST | tr '[a-z]' '[A-Z]'` | ||
|
||
{{- if .Values.restore.gcp }} | ||
downloader \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails for me. /bin/sh: line 7: downloader: command not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest image is just pushed to DockerHub.
/run-e2e-tests |
2 similar comments
/run-e2e-tests |
/run-e2e-tests |
/run-e2e-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* TiDB readiness probes (pingcap#147) * add readiness probes for tidb service * fix script
Signed-off-by: liubo02 <liubo02@pingcap.com>
this PR add restore job, the feature can restore data to a TiDB cluster, the premise is that the data is saved in the cloud (recommended gcs)