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

adding AWS - database backup/restore #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

adding AWS - database backup/restore #18

wants to merge 2 commits into from

Conversation

shaal
Copy link
Owner

@shaal shaal commented Jul 12, 2021

The Problem/Issue/Bug

It's not possible to maintain consistent database across workspaces.

How this PR Solves The Problem

Add AWS commands:
.gitpod/aws/aws-backup.sh [backup_name]
.gitpod/aws/aws-restore.sh [backup_name]

Manual Testing Instructions

  1. Create new Gitpod Environment variables through CLI (or directly in https://gitpod.io/variables)
    gp env AWS_ACCESS_KEY_ID=[ID]
    gp env AWS_SECRET_ACCESS_KEY=[SECRET]
    gp env AWS_DEFAULT_BUCKET=[BUCKET_NAME]
  2. open a new workspace (or stop/start current workspace, for gp env to take effect)
  3. Make some changes in current website.
  4. Run aws-backup.sh testing123 (for a named backup)
  5. Make additional changes in current website.
  6. Run aws-backup.sh (for general backup, to be used later in Gitpod's future end-tasks)
  7. Close workspace
  8. Open a new workspace
  9. Run aws-restore.sh testing123 (for restoring the named backup)
  10. Confirm first changes are in the website, after its DB was restored.
  11. Run aws-restore.sh (for restoring the latest backup available)
  12. Confirm second changes are in the website, after its DB was restored.

Related Issue Link(s)

Release/Deployment notes

@gitpod-io
Copy link

gitpod-io bot commented Jul 12, 2021

@shaal shaal added enhancement New feature or request WIP labels Jul 12, 2021
Copy link

@rfay rfay left a comment

Choose a reason for hiding this comment

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

Please add docs (or prompting?) equivalent to the PR manual testing instructions. I went straight to the PR expecting to see instructions there.

@mikenikles
Copy link

Elegant - the first word that came to mind 😄.

I'd love for this to be part of the new Gitpod Guides section we're working on (https://github.com/gitpod-io/website/issues/709) 🎉.

@rfay
Copy link

rfay commented Jul 13, 2021

One interesting thought would be to add a docker volume plugin like https://github.com/muthu-r/horcrux - that would allow saving and restoring snapshots directly from S3 or minio. I haven't tried it. And that plugin doesn't look active.

On second thought, although that is recommended in https://docs.docker.com/engine/extend/legacy_plugins/ ... it doesn't actually look like it's ever had any activity in issues or PRs or anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants