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: automated backups w/ AWS S3 #2305

Merged
merged 1 commit into from
Nov 29, 2017

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Nov 28, 2017

This commit adds automated backups using Amazon's S3 data storage as the
online component. Backups consist of three separate components:

  1. A mysqldump command to dump the data.
  2. A compression step to deflate data size
  3. An upload step to perform online backups.

The lib/backups.js library encapsulates all three steps in promises,
taking in the filename string at each step. It has some debug() calls
scattered around to allow DEBUG=backups to show the internal workings of
the script.

Closes #2284.

backupamazons3
Fig 1: What a backup looks like uploaded to AWS

@jniles
Copy link
Collaborator Author

jniles commented Nov 28, 2017

Note that this requires an S3 Access Key. We'll have to figure out how to share it around for testing and deployment.

@jniles
Copy link
Collaborator Author

jniles commented Nov 28, 2017

It looks like the s3 client is old and unmaintained. There are a few issues related to the security vulnerability reported by snyk, see andrewrk/node-s3-client#194 for the most recent one.

Fortunately, it looks like there is a fork that fixes the security issue andrewrk/node-s3-client#190 (comment)

I'll switch over the dependency to this fork in a second.

This commit adds automated backups using Amazon's S3 data storage as the
online component.  Backups consist of three separate components:
 1) A mysqldump command to dump the data.
 2) A compression step to deflate data size
 3) An upload step to perform online backups.

The lib/backups.js library encapsulates all three steps in promises,
taking in the filename string at each step.  It has some debug() calls
scattered around to allow DEBUG=backups to show the internal workings of
the script.

Closes Third-Culture-Software#2284.
@jniles
Copy link
Collaborator Author

jniles commented Nov 28, 2017

Switched. Everything is green now 👍

Copy link
Collaborator

@mbayopanda mbayopanda left a comment

Choose a reason for hiding this comment

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

LGTM

@jniles
Copy link
Collaborator Author

jniles commented Nov 29, 2017

Weeee!

bors r+

bors bot added a commit that referenced this pull request Nov 29, 2017
2305: feat: automated backups w/ AWS S3 r=jniles a=jniles

This commit adds automated backups using Amazon's S3 data storage as the
online component.  Backups consist of three separate components:
 1) A mysqldump command to dump the data.
 2) A compression step to deflate data size
 3) An upload step to perform online backups.

The lib/backups.js library encapsulates all three steps in promises,
taking in the filename string at each step.  It has some debug() calls
scattered around to allow DEBUG=backups to show the internal workings of
the script.

Closes #2284.

![backupamazons3](https://user-images.githubusercontent.com/896472/33368092-f956653c-d4f0-11e7-92d7-39e79e012282.PNG)
_Fig 1: What a backup looks like uploaded to AWS_
@bors
Copy link
Contributor

bors bot commented Nov 29, 2017

Build succeeded

@bors bors bot merged commit dc32826 into Third-Culture-Software:master Nov 29, 2017
@jniles jniles deleted the feat-s3-backups branch November 29, 2017 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants