simpleweb / simple-constraints

Rails routing constraints
MIT License
1 stars 0 forks source link

Capistrano tasks for DB backups #3

Open paulspringett opened 11 years ago

paulspringett commented 11 years ago

Potential for some default Capistrano tasks, including SQL / Mongo DB backups before and after migrations / deploy.

  1. Take a DB backup (on the server) before each deploy, no matter what.
  2. If migrations are run, take a backup after successful migration
  3. Gzip SQL files and store on the server. Rotate backups to keep DB backups for last 5 (?) backups

Thoughts @markjs @hecticjeff @tholder

markjs commented 11 years ago

:+1:

It'd be cool if we could just have it as an inclusion in the deploy file. include simpleweb/capistrano/mongo

paulspringett commented 11 years ago

@markjs yes, agreed. The tools should be available for devs to include as required

paulmasri commented 11 years ago

@paulspringett In point 2, would you include manually run rake tasks that have an effect on data too, or should that be a separate point?

paulspringett commented 11 years ago

@paulmasri It wouldn't be easy to automate that, but we could add manual ways run a backup, eg.

cap production db:backup
paulmasri commented 11 years ago

@paulspringett I wonder if the issue is that manual rake tasks are being done post deploy rather than having a way of queueing a script so that it is run (post backup) on the server upon deploy. Realistic? Desirable?