Skip to content

Commit

Permalink
FIX: Restoring backups could fail for database dumps > 8GiB
Browse files Browse the repository at this point in the history
This is a temporary fix until we ship a new image with bsdtar.
  • Loading branch information
gschlager committed May 19, 2020
1 parent 52228b1 commit 0a700d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/backup_restore/backup_file_handler.rb
Expand Up @@ -65,9 +65,10 @@ def decompress_archive
return if !@is_archive

log "Unzipping archive, this may take a while..."
pipeline = Compression::Pipeline.new([Compression::Tar.new, Compression::Gzip.new])
unzipped_path = pipeline.decompress(@tmp_directory, @archive_path, available_size)
pipeline.strip_directory(unzipped_path, @tmp_directory)
Discourse::Utils.execute_command(
'tar', '--extract', '--gzip', '--file', @archive_path, '--directory', @tmp_directory,
failure_message: "Failed to decompress archive."
)
end

def extract_db_dump
Expand Down

1 comment on commit 0a700d8

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/octal-string-exception-while-importing-database/151987/2

Please sign in to comment.