Class: Bard::Provision::Data
- Inherits:
-
Bard::Provision
- Object
- Struct
- Bard::Provision
- Bard::Provision::Data
- Defined in:
- lib/bard/provision/data.rb
Overview
copy data from production
Instance Attribute Summary
Attributes inherited from Bard::Provision
Instance Method Summary collapse
Methods inherited from Bard::Provision
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bard/provision/data.rb', line 4 def call print "Data:" print " Dumping #{server.key} database to file" server.run! "bin/rake db:dump" print " Transfering file from #{server.key}," server.copy_file "db/data.sql.gz", to: provision_server, verbose: false print " Loading file into database," provision_server.run! "bin/rake db:load" config.data.each do |path| print " Synchronizing files in #{path}," server.copy_dir path, to: provision_server, verbose: false end puts " ✓" end |