From 0a700d81fca8d84c83428e44e6ff31f392535fc1 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Tue, 19 May 2020 22:34:37 +0200 Subject: [PATCH] FIX: Restoring backups could fail for database dumps > 8GiB This is a temporary fix until we ship a new image with bsdtar. --- lib/backup_restore/backup_file_handler.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/backup_restore/backup_file_handler.rb b/lib/backup_restore/backup_file_handler.rb index c5e37024880..7b26356989e 100644 --- a/lib/backup_restore/backup_file_handler.rb +++ b/lib/backup_restore/backup_file_handler.rb @@ -65,9 +65,10 @@ module BackupRestore 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