Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
alexanderbuergin opened this issue Oct 21, 2024 · 3 comments
Closed

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

alexanderbuergin opened this issue Oct 21, 2024 · 3 comments
Labels

Comments

@alexanderbuergin
Copy link

alexanderbuergin commented Oct 21, 2024

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

brandonkelly added a commit that referenced this issue Oct 21, 2024
@brandonkelly
Copy link
Member

Thanks for reporting that! Just fixed for the next Craft 4 and 5 releases.

@alexanderbuergin
Copy link
Author

Thanks :)

@brandonkelly
Copy link
Member

Craft 4.12.8 and 5.4.9 are out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants