openaustralia / oaf

OpenAustralia Foundation
https://github.com/openaustralia/oaf#readme
4 stars 3 forks source link

Automated, standardised off-site server backup required (OAF-99) #98

Closed oajirabot closed 10 years ago

oajirabot commented 10 years ago

See also PA-27, OA-232, OA-244, OA-359.


Issue details imported from Jira:

Detail Value
Assignee Matthew Landauer
Reporter Henare Degan
Created 2010-10-07 12:11:19
Updated 2012-11-07 14:12:23

Imported Jira Comments

Matthew Landauer - 2012-10-05 11:06:54

Backs up all mysql and postgres databases to S3 every morning. See WDTK-19

Henare Degan - 2012-10-06 10:18:09

Can I reopen this until we're backing everything we need up using this standard technique? (e.g. shared files for the other apps)

Matthew Landauer - 2012-10-06 10:32:48

That's fine. Could you add a list of files to this ticket that should be backed up?

Matthew Landauer - 2012-10-07 14:52:01

Here's a starting list (off the top of my head):

general machine config:
/etc/*

openaustraliafoundation.org.au:
wordpress media

tickets.openaustraliafoundation.org.au:
jira attachments

openaustralia.org:
Hansard XML
Members & Senators images
Register of Interests pdfs

electionleaflets.org.au:
Nothing that I can think of (images are stored on S3)

planningalerts.org.au:
Nothing that I can think of

Henare Degan - 2012-10-17 13:15:44

A good list.

The shared Capistrano directories, /srv/www/*/shared, might be a safe idea, it'd capture a lot of what you've got above also.

Henare Degan - 2012-11-05 13:29:23

Backup is a RubyGem with an elegant DSL in Ruby for configuring your backups: https://github.com/meskyanichi/backup

Matthew Landauer - 2012-11-05 13:59:57

Damn it. That looks nice. If only you had told me about this before!

Henare Degan - 2012-11-05 14:02:11

Just what I said to myself when I saw it again. "Matthew's gonna kill me!"

Henare Degan - 2012-11-06 11:02:31

Looks like the offsite part of the existing backup could be failing. We're seeing this at the end of the backup:

<snip...>
Now transferring backups to S3...
Fatal Error: The file specification

cannot match any files in the base directory
   /
Useful file specifications begin with the base directory or some
pattern (such as '**') which matches the base directory.
du: cannot access ` ': No such file or directory

Matthew Landauer - 2012-11-06 11:11:16

Crap.

Matthew Landauer - 2012-11-07 10:25:32

First doing a backup by hand now. Later today I'm going to look at replacing the backup stuff with the gem that you suggest here.

Matthew Landauer - 2012-11-07 10:47:50

While it was dumping the pa_prod database it brought PlanningAlerts to a standstill. So, I stopped that.

Matthew Landauer - 2012-11-07 14:12:23

I couldn't understand and then I realised... When you dump the database it's going to stop writes from my understanding. This shouldn't be much of an issue I thought.

But then I realised when you do API requests it logs api usage in the database. So it tries to write.

I think I'm going to switch that off.

henare commented 10 years ago

@mlandauer put something in place a while back. We should write it up on https://github.com/openaustralia/openaustralia/wiki