newslynx / opportunities

A garden of NewsLynx futures
1 stars 0 forks source link

add restore from backup to automation #166

Closed mhkeller closed 8 years ago

mhkeller commented 8 years ago

this could be a good complement to the restore abilities that you just added to automation

abelsonlive commented 8 years ago

wanna take a stab at it? You can see how I implemented it here: https://github.com/newslynx/automation/blob/master/provisioning/templates/db-backup.sh.j2 and here: https://github.com/newslynx/automation/blob/master/provisioning/postgres.yaml#L55 this would be less about setting up a cron obviously. just putting a script somewhere as a helper.

mhkeller commented 8 years ago

sounds good

On Tue, Oct 6, 2015 at 5:09 PM, Brian Abelson notifications@github.com wrote:

wanna take a stab at it? You can see how I implemented it here:

https://github.com/newslynx/automation/blob/master/provisioning/templates/db-backup.sh.j2 and here:

https://github.com/newslynx/automation/blob/master/provisioning/postgres.yaml#L55 this would be less about setting up a cron obviously. just putting a script somewhere as a helper.

— Reply to this email directly or view it on GitHub https://github.com/newslynx/opportunities/issues/166#issuecomment-146001611 .

@mhkeller mhkeller.com

mhkeller commented 8 years ago

This is set up on the restore-backup branch: https://github.com/newslynx/automation/tree/restore-backup

It's not as fully automated as desirable but permissions were a big issue in getting some of the commands to run since root needs access to the files but postgres is the one that can execute what's in them. Steps to restore are documented in the readme https://github.com/newslynx/automation/tree/restore-backup#restoring-from-backup

I added the ability to separate backups by group so you could use one s3 bucket. If that sounds good @abelsonlive per https://github.com/newslynx/opportunities/issues/168, I'll merge to master

abelsonlive commented 8 years ago

Going to close this as it's covered in #168