Don't know how to build task 'heroku_backup'
Closed this issue · 7 comments
I'd love to use this gem. Every time I run this:
$ heroku rake heroku_backup
I get this error:
Don't know how to build task 'heroku_backup'
I don't understand what to do with the Rakefile portion of the instructions, which I would guess is causing the problem. My Rakefile looks like this:
require File.expand_path('../config/application', __FILE__)
require 'rake'
require "heroku_backup_task"
require "heroku_cloud_backup"
task :cron do
HerokuBackupTask.execute
HerokuCloudBackup.execute
end
MyAppRails3::Application.load_tasks
I'm am using Rails 3.0.3 and Ruby 1.9.2-p0. I don't use Rails tasks much so I'm probably doing something wrong. I'd appreciated any help or suggestions. I've included the full trace below.
Thanks,
David
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method MyAppRails3::Application#task called at /app/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/application.rb:214:in `initialize_tasks'
rake aborted!
Don't know how to build task 'heroku_backup'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/task_manager.rb:49:in `[]'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:111:in `invoke_task'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.9.2/bin/rake:32
/usr/ruby1.8.7/bin/rake:19:in `load'
/usr/ruby1.8.7/bin/rake:19
Do you have this in your Gemfile?
gem 'heroku_backup_task'
gem 'heroku_cloud_backup'
Thanks Kamui. I do have those in my Gemfile. I can succesfully run: $ heroku rake heroku_cloud_backup. But, I can't run: $ heroku rake heroku_backup.
Hmm.. Did you try the installation steps here:
I'm an idiot; it's working! Thanks for your help. I love seeing that list of backups in my S3 account. Now I can sleep at night.
I'm glad you got it working ;D
I have encountered the same error, it may be because my App is running on Cedar
The following FAILS
heroku run rake heroku_backup --app myapp
This one WORKS and places backup in s3 storage
heroku run rake heroku:cloud_backup --app myapp
thanks
By the way, i ran the backup manually so I could test the 2nd rake command (heroku run rake heroku:cloud_backup --app myapp)