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

feat: Implement backup and restore commands #1374

Merged
merged 4 commits into from
Jul 9, 2021
Merged

feat: Implement backup and restore commands #1374

merged 4 commits into from
Jul 9, 2021

Conversation

mmorhun
Copy link
Contributor

@mmorhun mmorhun commented Jul 6, 2021

Signed-off-by: Mykola Morhun [email protected]

What does this PR do?

Add server:backup and server:restore commands

What issues does this PR fix or reference?

eclipse-che/che#19932

How to test this PR?

Internal backup server

  1. Deploy Eclipse Che and make some changes
  2. Request backup by executing chectl server:backup and wait until it finishes
  3. Change / harm installation
  4. Request restore by executing chectl server:restore and wait until it finishes
  5. Check original config is applied

An external backup server

  1. Deploy Eclipse Che and make some changes
  2. Request backup by executing chectl server:backup -r rest:my.server.net:8000/che-backup and wait until it finishes
  3. Change / harm installation
  4. Request restore by executing chectl server:restore and wait until it finishes
  5. Check original config is applied

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

sshKey: string
}

export const BACKUP_CR_NAME = 'chectl-che-backup'
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need a chectl prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be sure we do not override user's CR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also to see that the CR is created by chectl

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is also user's CR but created with chectl.
if we need to mark CR with something then add this to annotation.
so, pls remove that prefix.

src/api/backup-restore.ts Outdated Show resolved Hide resolved
src/api/kube.ts Outdated Show resolved Hide resolved
src/api/kube.ts Outdated Show resolved Hide resolved
src/api/backup-restore.ts Show resolved Hide resolved
src/commands/server/backup.ts Outdated Show resolved Hide resolved
src/commands/server/backup.ts Show resolved Hide resolved
src/commands/server/backup.ts Show resolved Hide resolved
src/commands/server/restore.ts Outdated Show resolved Hide resolved
src/commands/server/restore.ts Outdated Show resolved Hide resolved
@mmorhun
Copy link
Contributor Author

mmorhun commented Jul 9, 2021

Rebased

@tolusha tolusha changed the title Implement backup and restore commands feat: Implement backup and restore commands Jul 9, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jul 9, 2021

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mmorhun, tolusha

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mmorhun mmorhun merged commit 2c0921b into main Jul 9, 2021
@mmorhun mmorhun deleted the che-19932 branch July 9, 2021 11:09
@che-bot che-bot added this to the 7.33 milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants