Backup files contain trailing HTML, corrupts archive backups

Created on 6 January 2022, almost 3 years ago
Updated 2 January 2024, 11 months ago

Problem/Motivation

Every site backup has trailing garbage at the end. When opening the .mysql.gz file in a text editor, at the very end is the message:

The website encountered an unexpected error. Please try again later.

This doesn't cause too much issue, as 7-Zip and gunzip can unzip files with trailing garbage and discard the garbage. The resulting mysql file imports fine. However, it is annoying, as DDEV cannot import .gz files with trailing garbage using the import-db command, so I have to manually unzip them.

Steps to reproduce

I'm not sure what causes it, but it happens for every backup I do on a Drupal 9 site.

I decided to inspect the backups on the server itself, rather than inspecting a downloaded file.

  • I found that the backup files themselves do not contain any trailing garbage.
  • Rather, the garbage is appended during the download process.

Hopefully this helps with troubleshooting this issue.

Proposed resolution

Find the cause of the error being written to the gz. Could also potentially check if the .gz file has that message or other garbage after and remove it?

πŸ› Bug report
Status

Closed: duplicate

Version

5.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024