Created
August 14, 2009 07:11
-
-
Save speedmax/167686 to your computer and use it in GitHub Desktop.
app:sync - local and production synchronization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app:sync | |
# Local and production synchronization | |
# - require yaml_db plugin | |
namespace :app | |
namespace :sync do | |
task :all => [:files, :db] | |
task :files do | |
`rsync -azv user@host:'/apps/myawesomeapp/shared/files/' #{Rails.root + 'files'}` | |
end | |
task :db do | |
`cap production invoke TASK="db:data:dump"` | |
`rsync -azv user@host:'/apps/myawesomeapp/current/db/' #{Rails.root + 'db'}` | |
Rake::Task["db:data:load"].invoke | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment