Commit 2a10f6816207b51b9a67ec3da83844224031ebbb

Authored by Arthur Esposte
Committed by Rodrigo Siqueira de Melo
1 parent 895b1e2e

Add exported_data task to export Software Catalog data to CSV

Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
Rakefile
... ... @@ -122,6 +122,14 @@ task :restore => [ssh_config_file, config_file] do
122 122 sh 'ssh', '-F', ssh_config_file, 'integration', 'sudo', 'systemctl start colab'
123 123 end
124 124  
  125 +task :export_data => [ssh_config_file, config_file] do
  126 + # setup
  127 + sh 'mkdir', '-p', 'exported_data'
  128 + #social
  129 + sh 'ssh', '-F', ssh_config_file, 'social', 'cd /usr/lib/noosfero/ && sudo -u noosfero RAILS_ENV=production bundle exec rake export:catalog:csv'
  130 + sh 'scp', '-F', ssh_config_file, 'social:/tmp/software_catalog_csvs.tar.gz', 'exported_data/'
  131 +end
  132 +
125 133 task :bootstrap_common => 'config/local/ssh_config'
126 134  
127 135 unless ENV['nodeps']
... ...