summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-08-14 08:03:38 -0600
committermo k <mo@mokhan.ca>2012-08-14 08:03:38 -0600
commit2619298f05776c515c85af4ad65d55fc572ba9c2 (patch)
treebc73ad5f590f60dd659dd7108f083905de6eef94
parentebe6a9aa5fd30d02e2b68ad7a02647a9caf254cd (diff)
change restore to use 'latest' symlink in restore db task.
-rw-r--r--Rakefile4
-rw-r--r--capfile2
2 files changed, 3 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 547f9d20..e7e66e3a 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` /db/backups/latest"
# 3. restore backup on staging
- #sh "cap staging restore_db"
+ sh "cap staging restore_db"
end
diff --git a/capfile b/capfile
index 8e8f5ec7..40f9b697 100644
--- a/capfile
+++ b/capfile
@@ -26,6 +26,6 @@ task :backup_db do
end
task :restore_db do
- upload("db/backups/#{filename}", "db/backups/#{filename}", :via => :scp)
+ upload("db/backups/latest", "db/backups/latest", :via => :scp)
run "psql -U postgress -d #{destination_db} -f #{dumpfile}"
end