Restore is successful even though subject says error

kristian

Verified User
Joined
Nov 4, 2005
Messages
440
Location
Norway
Hi folks.

When doing an admin-level restore of an account from another server, the restore seems to be successful, but the following message shows up in the Message System:

Code:
Subject: An error occurred during the restore.
Domain <redacted domain> CreatedDomain Created Successfully

User <redacted dbuser>@localhost password to be altered, but using an old password format
Recommend re-saving their password to save with the newer format.

While this message might technically be correct, it is also a little confusing. The password field for the problem user is exactly the same as it was on the original server, so it seems to have been restored fine. It also seems everything else was restored fine.

This backup/restore is part of a bigger migration script I use, which waits for messages in the message system to determine the result of the restore operation. Currently this throws an error when it sees the "An error occurred during the restore." message. It might not be the best method for this, but it was the only programmatically method I found. Currently I don't parse the message body, and while I could write a test for this particular situation, it would be quite tricky to predict all kinds of possible text in the message.

Is there any better way to programmatically determine the result of a backup and restore operation?

If not, would it be possible to standardise the subject and/or body of these messages, so they get a little easier to parse with a script?

Unpredictable things such as this is one of the reasons why I am reluctant to share some of the scripts I've written. They seem too fragile.
 
The issue I'm having is probably related to the password mechanism used by old versions of MySQL/MariaDB when users were created. My point is that the restore was seemingly successful, yet it triggers this error suggesting to my script that it was not successful. :)

In order to programmatically parse messages, human style messages are a bad thing.
 
Back
Top