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

Database periodic backups #116

Open
lightvector opened this issue Jan 23, 2016 · 1 comment
Open

Database periodic backups #116

lightvector opened this issue Jan 23, 2016 · 1 comment

Comments

@lightvector
Copy link
Owner

This isn't a change that requires any actual coding work in this repo, it's just a reminder to figure out fairly soon how to set up a reasonable periodic backup process for the database server in case something bad happens to the live site at playarimaa.org. It might as well go in with all of the other issues here since it's a convenient place to add it to make sure it's not forgotten.

@mattj256
Copy link
Collaborator

At work we use a cron job to take daily snapshots of the EBS (like a hard drive).
Amazon charges 10 cents per GB per month for EBS snapshot storage. The Amazon SDK provides a command line interface so this is a one-line command.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html

Alternatively, you can use the native backup tools for the database to generate an ASCII file, then store it somewhere. (Amazon S3 is the standard storage option and that's what I'd recommend. It costs between 1-3 cents per GB per month. If that's too expensive you can look at Amazon Glacier.)

Taking an EBS snapshot doesn't place load on the application or web server, which is cool. The EBS snapshot isn't going to contain anything cached by the database or the operating system, so you can either flush the data or shut down the database and unmount the EBS drive, or just accept that it's not going to be an 100% complete snapshot. The database native backup tool will presumably give you a more complete and up-to-date snapshot in exchange for plenty of load on the database and some locked database tables while the query is in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants