• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Restore of customers/subscriptions/domains/databases fails if the customer or the subscription was disabled during backup

Bitpalast

Plesk addicted!
Plesk Guru
Username:

TITLE

Restore of customers/subscriptions/domains/databases fails if the customer or the subscription was disabled during backup

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Obsidian 18.0.70 #3 and 18.0.71 #1
Alma 8
MariaDB 10.11

PROBLEM DESCRIPTION

When a disabled customer account is backed up with the Plesk Backup Manager, the databases in that account are backed up with an invalid SQL dump line. The dumps start with
Code:
/*M!999999\- enable the sandbox mode */
When the customer, the subscription, the domain or the database is restored from such a backup, the restore fails. It won't restore the database(s), because the syntax at the beginning of the dump files is not recognized by MariaDB.

STEPS TO REPRODUCE

1. Create a customer with a subscription
2. Create a database in that subscription
3. Suspend the customer
4. Do a full server backup using Plesk Backup Manager
5. Attempt to restore the customer from that backup.

ACTUAL RESULT

The database is created, but the content (the dump) is not imported into it. Backup manager shows warnings such as:

Warning: Restore domain "<mydomain.tld>"
Failed to restore the extension wp-toolkit: Error: The site you have requested is not installed.Run `wp core install` to create database tables.

Warning: Restore hosting "<mydomain.tld>"
Failed deployment of the database <mydatabase> (domain <mydomain.tld>)
Warning:
Errors occurred during deployment of the database content. Not all content may be restored. Resolve the errors if required or try to restore the content manually from the archive: databases/<mydatabase>[sqldump]: backup_sqldump_2507040153.tzst
Warning:
Execution of /usr/bin/mariadb --defaults-file=/etc/my.cnf -u backup_nCBf6Y4 -h localhost -P 3306 --default-character-set utf8 --abort-source-on-error <mydatabase> failed with return code 1.Stdin issource /tmp/pmm-ru-udb-dump-GPvvuS/backup_sqldump_2507040153;exitStderr isERROR at line 1 in file: '/tmp/pmm-ru-udb-dump-GPvvuS/backup_sqldump_2507040153': Unknown command '\-'.Last error isResource temporarily unavailable

EXPECTED RESULT

Error-free restore

ANY ADDITIONAL INFORMATION

The lines at the beginning of the SQL dump file in the backup archive look like this:

Code:
/*M!999999\- enable the sandbox mode */
-- MariaDB dump 10.19  Distrib 10.11.13-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: <mydatabase>
-- ------------------------------------------------------
-- Server version       10.11.13-MariaDB

Workaround:
Extract the database dump from the tzst-file manually, then remove the first line and import the database manually.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Thank you for the report, Peter. I am unable to replicate the issue on a test AlmaLinux 8.10 server, with MariaDB 10.11. I tried suspending the user before, after, and during the backup creation with no luck. The database is properly restored through the Customer, Subscription, and Database options. Could you please double-check /var/log/mariadb/mariadb.log and confirm if there are any errors related to the database there?
 
Just for reference:
It seems to have something to do with that. I'll try to reproduce it here on a test system once I find the time for it.
 
Back
Top