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

support prefix for backup path #2435

Merged
merged 12 commits into from
May 13, 2020

Conversation

onlymellb
Copy link
Contributor

@onlymellb onlymellb commented May 11, 2020

What problem does this PR solve?

This PR resolve #1795

What is changed and how does it work?

Set the backup path prefix for backup CR

backup CR example:

---
apiVersion: pingcap.com/v1alpha1
kind: Backup
metadata:
  name: demo1-backup-s3
  namespace: test1
spec:
  from:
    host: demo1-tidb
    port: 4000
    user: root
    secretName: backup-demo1-tidb-secret
  s3:
    provider: aws
    bucket: test1-demo1
    region: us-west-2
    prefix:  onlymellb
    secretName: aws-secret
  storageClassName: local-storage
  storageSize: 1Gi

image

restore CR example:

apiVersion: pingcap.com/v1alpha1
kind: Restore
metadata:
  name: demo2-restore
  namespace: test2
spec:
  to:
    host: demo2-tidb
    port: 4000
    user: root
    secretName: tidb-secret
  s3:
    provider: aws
    secretName: aws-secret
    region: us-west-2
    path: s3://test1-demo1/onlymellb/backup-2020-05-11T15:11:28Z.tgz
  storageClassName: local-storage
  storageSize: 1Gi

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Code changes

  • Has Go code change

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Does this PR introduce a user-facing change?:

support set the backup path prefix for remote storage

@onlymellb onlymellb marked this pull request as ready for review May 12, 2020 04:42
@onlymellb
Copy link
Contributor Author

/run-e2e-tests

@onlymellb onlymellb requested review from DanielZhangQD, LinuxGit and weekface and removed request for DanielZhangQD May 12, 2020 04:43
@onlymellb
Copy link
Contributor Author

/run-e2e-tests

Yisaer
Yisaer previously approved these changes May 13, 2020
@onlymellb
Copy link
Contributor Author

/run-e2e-tests

DanielZhangQD
DanielZhangQD previously approved these changes May 13, 2020
Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@onlymellb
Copy link
Contributor Author

/run-e2e-tests

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielZhangQD
Copy link
Contributor

/merge

@DanielZhangQD
Copy link
Contributor

/run-e2e-tests

@DanielZhangQD
Copy link
Contributor

/merge

1 similar comment
@DanielZhangQD
Copy link
Contributor

/merge

@DanielZhangQD DanielZhangQD merged commit b37d61d into pingcap:master May 13, 2020
sre-bot pushed a commit to sre-bot/tidb-operator that referenced this pull request May 13, 2020
* enable customizing mydumper options in CRD backup

* support set backup prefix for remote storage

* address comments

* merge branch master into support-prefix-for-backup-path

Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
@sre-bot
Copy link
Contributor

sre-bot commented May 13, 2020

cherry pick to release-1.1 in PR #2464

DanielZhangQD added a commit that referenced this pull request May 14, 2020
* enable customizing mydumper options in CRD backup

* support set backup prefix for remote storage

* address comments

* merge branch master into support-prefix-for-backup-path

Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>

Co-authored-by: onlymellb <luolibin@pingcap.com>
Co-authored-by: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants