Skip to content

Commit

Permalink
Merge pull request #151 from genesis/151-updb-remote-backup
Browse files Browse the repository at this point in the history
Add `backup` task to `:up:db`
  • Loading branch information
EvanK committed Jan 11, 2016
2 parents a87a157 + e852a5b commit f525fb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deployment/lib/sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@

desc "Uploads Vagrant database into remote"
task :db, :roles => :db, :once => true do
find_and_execute_task "genesis:backup:db"
sleep(1)

set :backup_dir, "#{deploy_to}/backups"
set :backup_name, DateTime.now.strftime("#{db_name}.%Y-%m-%d.%H%M%S.sql")
set :backup_path, "#{backup_dir}/#{backup_name}"
Expand Down

0 comments on commit f525fb2

Please sign in to comment.