Issue
Backup cannot start due to the pre or post-scripts cannot be executed without an error. Acronis backup process stop and goes to failed state with the following error:
MESSAGEOperation failed because the pre/post command returned non-zero exit code.
Additional info:------------------------
Error code: 20250646
Fields: {"$module":"mms_lxa64_29805","CommandID":"D332948D-A7A9-4E07-B76C-253DCF6E17FB"}
Message: TOL: Failed to execute the command. Backup plan 'CloudLinux Backup'
Environment
- Imunify360 stand-alone
- Acronis Backup plugin
Solution
The relevant errors can be found in the log file placed here:
FREEZE_LOGFILE=/var/log/cloudlinux-backup-mysql-freeze.log
The error should point to the reason, in this particular case, since this is a standalone version - the script cannot fetch MySQL credentials from my.cnf file, the error will be the next:
To get it fixed, the relevant credentials should be provided, by default this script /usr/libexec/cloudlinux-backup/pre-mysql-freeze-script search them in /root/.my.cnf:
# cat /usr/libexec/cloudlinux-backup/pre-mysql-freeze-script | grep my.cnf
if [ -f /root/.my.cnf ]; then
MYSQL_AUTH_OPTION='--defaults-extra-file=/root/.my.cnf'
Usually, file /root/.my.cnf contain username and password for MySQL authorisaton:
[client]
user=root
password=mypassword
If this file was not created, it is necessary to do it, and specify the correct credentials for authorization on the MySQL server. After credentials will be provided backup should start without this issue,
Note, in the secure reason it is necessary to set strict permission for this file, like 600.
# chmod 600 /root/.my.cnf.
In addition, to be sure that it works as expected, before starting back up, it makes sense to start the pre and post-scripts manual and check its output in a log file
# ll /usr/libexec/cloudlinux-backup/
total 8
-rwxr-xr-x 1 root root 602 Feb 22 12:47 post-mysql-thaw-script
-rwxr-xr-x 1 root root 2130 Feb 22 12:47 pre-mysql-freeze-script
Useful Links
Comments
0 comments
Please sign in to leave a comment.