summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-08-15 12:35:55 -0600
committermo k <mo@mokhan.ca>2012-08-15 12:35:55 -0600
commitc674a9ded15f2d4bc148a6ba23b110a4589da5c2 (patch)
tree0245dac05da5d7780cb659c77ab22ea1f791c702 /Rakefile
parente8f6bf1c002266642f6cea488ad99d8882c37f38 (diff)
create rake restore task to take backup from production and restore it to staging.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 90db3574..fb924f58 100644
--- a/Rakefile
+++ b/Rakefile
@@ -42,10 +42,10 @@ end
task :restore do
# 1. backup prod database
- #sh "cap production backup_db"
+ sh "cap production backup_db"
# 2. copy backup to staging
- sh "ln -s db/backups/`ls -rt db/backups/ | tail -n1` latest"
+ sh "rm -f latest && ln -s db/backups/`ls -rt db/backups/ | tail -n1` latest"
# 3. restore backup on staging
- #sh "cap staging restore_db"
+ sh "cap staging restore_db"
end