mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
FIX: Backups should use relative paths for local uploads
This also ensures that restoring a backup works when it was created with the wrong upload paths in the time between ab4c0a4970
(shortly after v2.6.0.beta1) and this fix.
This commit is contained in:
parent
2fac77cc48
commit
f51ccea028
4 changed files with 36 additions and 5 deletions
|
@ -67,6 +67,8 @@ module BackupRestore
|
|||
log "Unzipping archive, this may take a while..."
|
||||
Discourse::Utils.execute_command(
|
||||
'tar', '--extract', '--gzip', '--file', @archive_path, '--directory', @tmp_directory,
|
||||
'--transform', 's|var/www/discourse/public/uploads/|uploads/|',
|
||||
# the transformation is a workaround for a bug which existed between v2.6.0.beta1 and v2.6.0.beta2
|
||||
failure_message: "Failed to decompress archive."
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue