summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-08-09 14:29:23 -0600
committermo khan <mo@mokhan.ca>2013-08-09 14:29:23 -0600
commit8eee6727265617955a1839ef2f8c69d9fe75db36 (patch)
tree578cbe99cdcfb97d4db80a8c866c4c6a38347356
parenta90d09be8a682523e762bda68a3b69bae2bb2864 (diff)
add descriptions to the database backup/restore tasks
-rw-r--r--config/deploy.rb2
-rw-r--r--config/recipes/utility.rb (renamed from config/recipes/server.rb)0
-rw-r--r--lib/tasks/db.rake3
3 files changed, 3 insertions, 2 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 81b74a3..d6a52e2 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -10,7 +10,7 @@ load "config/recipes/rbenv"
load "config/recipes/newrelic"
load "config/recipes/monit"
# general tasks
-load "config/recipes/server"
+load "config/recipes/utility"
set :application, "parley"
set :user, "deployer"
diff --git a/config/recipes/server.rb b/config/recipes/utility.rb
index 6d71371..6d71371 100644
--- a/config/recipes/server.rb
+++ b/config/recipes/utility.rb
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index 6bb4bcb..38fb2c5 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -1,12 +1,13 @@
require "yaml"
namespace :db do
- desc 'backup database (rake db:backup["production"]'
+ desc 'backup database (rake db:backup["prod"])'
task :backup, :env do |key, value|
environment = value[:env] || 'qa'
sh "cap #{environment} postgresql:backup"
end
+ desc 'restore database to local'
task :restore, :env do |key, value|
environment = value[:env] || 'development'
all_configuration = YAML.load_file(File.join(File.dirname(__FILE__), '../../config/database.yml' ))