mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:50:00 +08:00
FIX: Restoring backups could fail for database dumps > 8GiB
This is a temporary fix until we ship a new image with bsdtar.
This commit is contained in:
parent
52228b1fa6
commit
0a700d81fc
|
@ -65,9 +65,10 @@ module BackupRestore
|
||||||
return if !@is_archive
|
return if !@is_archive
|
||||||
|
|
||||||
log "Unzipping archive, this may take a while..."
|
log "Unzipping archive, this may take a while..."
|
||||||
pipeline = Compression::Pipeline.new([Compression::Tar.new, Compression::Gzip.new])
|
Discourse::Utils.execute_command(
|
||||||
unzipped_path = pipeline.decompress(@tmp_directory, @archive_path, available_size)
|
'tar', '--extract', '--gzip', '--file', @archive_path, '--directory', @tmp_directory,
|
||||||
pipeline.strip_directory(unzipped_path, @tmp_directory)
|
failure_message: "Failed to decompress archive."
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def extract_db_dump
|
def extract_db_dump
|
||||||
|
|
Loading…
Reference in New Issue
Block a user