summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-10-12 08:28:45 -0600
committermo khan <mo@mokhan.ca>2013-10-12 08:28:45 -0600
commit3627f6b4edb282f0807caa9674e66b76b8d6178a (patch)
tree19cd54321feaa1d7b5ef335a7d81f59eaed48ce1
parentb3f14df64515e312e13230beda2527af6542292f (diff)
add rake task to create a backup from heroku.
-rw-r--r--lib/tasks/db.rake6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
new file mode 100644
index 0000000..a211a50
--- /dev/null
+++ b/lib/tasks/db.rake
@@ -0,0 +1,6 @@
+namespace :db do
+ task :backup do
+ sh "heroku pgbackups:capture --expire"
+ sh "heroku pgbackups:url | xargs wget -O tmp/database.tmp"
+ end
+end