summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-27 17:12:51 -0600
committermo khan <mo@mokhan.ca>2013-09-14 08:03:21 -0600
commit368e71a52d4bf9a1781da93a5c40aa009d832b95 (patch)
tree8d617f7646887cd5225ac042c0bae751e6419285
parentf4f2f26066edcf0a97f9cb6ce62b85954f73bbef (diff)
update rake task to invoke the proper capistrano command when backing up or restoring databases
-rw-r--r--lib/tasks/database.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/database.rake b/lib/tasks/database.rake
index c0d699fa..16038fb3 100644
--- a/lib/tasks/database.rake
+++ b/lib/tasks/database.rake
@@ -8,10 +8,10 @@ namespace :db do
#sh "pg_restore --verbose --clean --no-acl --no-owner -h localhost -U #{config[Rails.env]["username"]} -d #{destination_db} #{dumpfile}"
end
task :backup do
- sh "cap production backup_db"
+ sh "cap production postgresql:backup"
sh "rm -f latest && ln -s db/backups/`ls -rt db/backups/ | tail -n1` latest"
end
task :restore_to_staging => :backup do
- sh "cap staging restore_db"
+ sh "cap staging postgresql:restore"
end
end