BUGFIX: export was broken, not exporting any tables

This commit is contained in:
Sam 2014-01-17 12:33:19 +11:00
parent 5a499b586f
commit a30aaa90d5
1 changed files with 5 additions and 4 deletions

View File

@ -93,14 +93,15 @@ module Jobs
tar_filename = "#{@output_base_filename}.tar"
upload_directory = "uploads/" + RailsMultisite::ConnectionManagement.current_db
FileUtils.cd(File.dirname(filenames.first)) do
`tar cvf #{tar_filename} #{File.basename(filenames.first)}`
end
FileUtils.cd(File.join(Rails.root, 'public')) do
`tar cvf #{tar_filename} #{upload_directory}`
end
FileUtils.cd(File.dirname(filenames.first)) do
`tar --append --file=#{tar_filename} #{File.basename(filenames.first)}`
end
`gzip #{tar_filename}`
true