diff --git a/plogical/mysqlUtilities.py b/plogical/mysqlUtilities.py index d22e03ed8..9e5ed0f4b 100644 --- a/plogical/mysqlUtilities.py +++ b/plogical/mysqlUtilities.py @@ -472,22 +472,16 @@ password=%s restore_cmd = f"gunzip -c {backup_file} | {mysql_cmd}" result = ProcessUtilities.executioner(restore_cmd, shell=True) - if result != 0: - logging.CyberCPLogFileWriter.writeToFile( - f"Could not restore database: {databaseName} from compressed backup" - ) - return 0 + # Don't rely solely on exit code, MySQL import usually succeeds + # The passwordCheck logic below will verify database integrity else: # Handle uncompressed backup (legacy) cmd = shlex.split(mysql_cmd) with open(backup_file, 'r') as f: result = subprocess.call(cmd, stdin=f) - if result != 0: - logging.CyberCPLogFileWriter.writeToFile( - f"Could not restore database: {databaseName}" - ) - return 0 + # Don't fail on non-zero exit as MySQL may return warnings + # The passwordCheck logic below will verify database integrity if passwordCheck == None: