BUGFIX: force tar to follow symlinks during the export

This commit is contained in:
Régis Hanol 2014-02-25 19:23:37 +01:00
parent b15e771d67
commit 32e3058f16
1 changed files with 3 additions and 3 deletions

View File

@ -222,19 +222,19 @@ module Export
log "Archiving metadata..." log "Archiving metadata..."
FileUtils.cd(File.dirname(@meta_filename)) do FileUtils.cd(File.dirname(@meta_filename)) do
`tar --append --file #{tar_filename} #{File.basename(@meta_filename)}` `tar --append --dereference --file #{tar_filename} #{File.basename(@meta_filename)}`
end end
log "Archiving data dump..." log "Archiving data dump..."
FileUtils.cd(File.dirname(@dump_filename)) do FileUtils.cd(File.dirname(@dump_filename)) do
`tar --append --file #{tar_filename} #{File.basename(@dump_filename)}` `tar --append --dereference --file #{tar_filename} #{File.basename(@dump_filename)}`
end end
upload_directory = "uploads/" + @current_db upload_directory = "uploads/" + @current_db
log "Archiving uploads..." log "Archiving uploads..."
FileUtils.cd(File.join(Rails.root, "public")) do FileUtils.cd(File.join(Rails.root, "public")) do
`tar --append --file #{tar_filename} #{upload_directory}` `tar --append --dereference --file #{tar_filename} #{upload_directory}`
end end
log "Gzipping archive..." log "Gzipping archive..."