DrupalPod icon indicating copy to clipboard operation
DrupalPod copied to clipboard

adding AWS - database backup/restore

Open shaal opened this issue 4 years ago • 3 comments

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

shaal avatar Jul 12 '21 02:07 shaal

gitpod-io[bot] avatar Jul 12 '21 02:07 gitpod-io[bot]

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) 🎉.

mikenikles avatar Jul 12 '21 20:07 mikenikles

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.

rfay avatar Jul 13 '21 23:07 rfay