alexkravets / heroku-mongo-backup

Backup mongodb on Heroku and push it to S3 or FTP with cron task.
https://github.com/alexkravets/heroku-mongo-backup
55 stars 33 forks source link

MONGOHQ || MONGOLAB on 'staging' environment? #9

Closed taromurao closed 11 years ago

taromurao commented 11 years ago

I struggled a while when I tried to test heroku-mongo-back on my ''staging' app. I have RACK_ENV=staging, RAILS_ENV=staging.

How do you think of modifying below code

if((ENV['RAILS_ENV'] || ENV['RACK_ENV']) == 'production')

to

if(['production', 'staging'].include?(ENV['RAILS_ENV'] || ENV['RACK_ENV']))

Another solution is to simply inform users on the documentation, e.g. RAILS_ENV and/or RACK_ENV should be 'production'.

alexkravets commented 11 years ago

yes, this makes sense I'll add this with the next push

alexkravets commented 11 years ago

added in 0.4.2

henrydjacob commented 11 years ago

Can you make it generic. this doesn't work if environments named other than staging and production? I my case i have environments for 'pilot' and 'test'

jturolla commented 11 years ago

I agree with henrydjacob, my staging was named test.

alexkravets commented 11 years ago

Guys, thanks for the feedback. I'll probably will not have time to fix it in near future. So if this is an issue for you, please go ahead and fix it (the code is pretty simple there) and I will merge pull request.

On Jan 16, 2013, at 8:25 AM, Henry Jacob notifications@github.com wrote:

Can you make it generic. this doesn't work if environments named other than staging and production? I my case i have environments for 'pilot' and 'test'

— Reply to this email directly or view it on GitHub.