FIX: Always backup local uploads in addition to files stored on S3

This commit is contained in:
Gerhard Schlager 2019-07-19 15:13:05 +02:00
parent 1f1b3e99d1
commit b73bd7fc1b
1 changed files with 4 additions and 7 deletions

View File

@ -252,11 +252,8 @@ module BackupRestore
) )
end end
if SiteSetting.Upload.enable_s3_uploads add_local_uploads_to_archive(tar_filename)
add_remote_uploads_to_archive(tar_filename) add_remote_uploads_to_archive(tar_filename) if SiteSetting.Upload.enable_s3_uploads
else
add_local_uploads_to_archive(tar_filename)
end
remove_tmp_directory remove_tmp_directory
@ -280,7 +277,7 @@ module BackupRestore
failure_message: "Failed to archive uploads.", success_status_codes: [0, 1] failure_message: "Failed to archive uploads.", success_status_codes: [0, 1]
) )
else else
log "No uploads found, skipping archiving uploads..." log "No local uploads found. Skipping archiving of local uploads..."
end end
end end
end end
@ -323,7 +320,7 @@ module BackupRestore
end end
end end
log "No uploads found, skipping archiving uploads..." if count == 0 log "No uploads found on S3. Skipping archiving of uploads stored on S3..." if count == 0
end end
def upload_archive def upload_archive