Permalink
Browse files

names fix

  • Loading branch information...
1 parent 289c57b commit a6c697142f8644ee14cff41676587a88dc462fe3 @everzet committed Jun 5, 2010
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/capifony.rb
View
@@ -191,6 +191,7 @@ def load_database_config(data, env = 'prod')
namespace :database do
namespace :move do
+ desc "Dump remote database, download it to local & populate here"
task :remote_to_local do
filename = "#{application}.local_dump.#{Time.now.to_i}.sql.bz2"
file = "/tmp/#{filename}"
@@ -222,6 +223,7 @@ def load_database_config(data, env = 'prod')
`rm backups/#{sqlfile}`
end
+ desc "Dump local database, load it to remote & populate there"
task :local_to_remote do
filename = "#{application}.local_dump.#{Time.now.to_i}.sql.bz2"
file = "backups/#{filename}"
@@ -257,36 +259,36 @@ def load_database_config(data, env = 'prod')
namespace :shared do
namespace :database do
desc "Download config/databases.yml from remote server"
- task :download do
+ task :to_local do
download("#{shared_path}/config/databases.yml", "config/databases.yml", :via => :scp, :recursive => true)
end
desc "Upload config/databases.yml to remote server"
- task :upload do
+ task :to_remote do
upload("config/databases.yml", "#{shared_path}/config/databases.yml", :via => :scp, :recursive => true)
end
end
namespace :logs do
desc "Download all logs from remote folder to local one"
- task :download do
+ task :to_local do
download("#{shared_path}/log", "log", :via => :scp, :recursive => true)
end
desc "Upload all logs from local folder to remote one"
- task :upload do
+ task :to_remote do
upload("log", "#{shared_path}/log", :via => :scp, :recursive => true)
end
end
namespace :uploads do
desc "Download all files from remote web/uploads folder to local one"
- task :download do
+ task :to_local do
download("#{shared_path}/web/uploads", "web/uploads", :via => :scp, :recursive => true)
end
desc "Upload all files from local web/uploads folder to remote one"
- task :upload do
+ task :to_remote do
upload("web/uploads", "#{shared_path}/web/uploads", :via => :scp, :recursive => true)
end
end

0 comments on commit a6c6971

Please sign in to comment.