Skip to content

Error creating database backup via Web GUI in Craft CMS 5.4.8 #15933

@alexanderbuergin

Description

@alexanderbuergin

What happened?

Description

When attempting to create a database backup via the Web GUI in Craft CMS version 5.4.8, the process fails with the following error message:

Log

2024-10-21 18:48:44 [web.ERROR] [yii\base\Exception] yii\base\Exception: Could not create backup: The shell command "mysqldump '--defaults-file'='/tmp/pezgrprkdarr.cnf' '--add-drop-table' '--comments' '--create-options' '--dump-date' '--no-autocommit' '--routines' '--default-character-set'='utf8mb3' '--set-charset' '--triggers' '--no-tablespaces' '--no-data' '--skip-triggers' '--result-file'='/home/site/public_html/site/siteV1/storage/backups/site-d'humanite--2024-10-21-164844--v5.4.8.sql' 'site_site' && mysqldump '--defaults-file'='/tmp/pezgrprkdarr.cnf' '--add-drop-table' '--comments' '--create-options' '--dump-date' '--no-autocommit' '--routines' '--default-character-set'='utf8mb3' '--set-charset' '--triggers' '--no-tablespaces' '--no-create-info' '--ignore-table'='site_site.assetindexdata' '--ignore-table'='site_site.cache' '--ignore-table'='site_site.imagetransformindex' '--ignore-table'='site_site.resourcepaths' '--ignore-table'='site_site.phpsessions' '--ignore-table'='site_site.sessions' 'site_site' >> "/home/site/public_html/site/siteV1/storage/backups/site-d'humanite--2024-10-21-164844--v5.4.8.sql"" failed with exit code 1: sh: -c: line 0: unexpected EOF while looking for matching `"'

The site name contains special characters: d’Humanité. Prior to Craft CMS version 5.4.8, backups worked as expected, despite the special characters in the site name. It appears that since the update, a decoding step might be needed before the backup is created.

Expected behavior:

The backup should complete without errors and be saved to the specified directory, as it did in previous Craft CMS versions.

Steps to reproduce:

  1. Navigate to the Web GUI and attempt to create a database backup.
  2. Observe that the process fails with the error message mentioned above.
  3. Same via CLI: php craft db/backup

We have changed the Site Name to be able to continue working.

Craft CMS version

5.4.8

PHP version

8.3.10

Operating system and version

No response

Database type and version

MariaDB 10.6.14

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions