Commit fc22ed03

mo k <mo@mokhan.ca>
2012-06-05 13:34:47
drop in a few tasks to start creating and restoring database backups.
1 parent 27c5613
Changed files (1)
capfile
@@ -36,3 +36,12 @@ task :update_bundler do
   run "bundle install --gemfile #{release_path}/Gemfile"
   run "cd #{release_path} && bundle exec rake db:migrate RAILS_ENV=production && bundle exec rake db:seed RAILS_ENV=production"
 end
+
+task :backup_db do
+  run "pg_dump -U postgress cakeside_production -f #{filename}"
+end
+
+task :restore_db do
+  run "psql -U postgress -d #{destination_db} -f #{dumpfile}"
+end
+