speedmax (owner)

Forks

Revisions

gist: 167686 Download_button fork
public
Description:
app:sync - local and production synchronization
Public Clone URL: git://gist.github.com/167686.git
Embed All Files: show embed
sync.rake #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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