[CLOSED] ⚠️ CRITICAL LESSON: Never rename a production database via cPanel MySQL API #8

Closed
opened 2026-07-03 08:25:17 +00:00 by wmj · 1 comment
Owner

What Happened

On 2026-07-03, the database maiforsc_ummahwp was accidentally renamed to maiforsc_ummahwp_temp via the cPanel Mysql/rename_database UAPI endpoint, causing a full site outage on ummah.falahos.my.

Root Cause: The agent assumed rename_database would create a copy/snapshot. It is actually an instantaneous, irreversible rename with no undo.

The Lesson

"RENAME" is not "CLONE" — never run Mysql/rename_database on a production database unless you intend to permanently rename it. Always:

  1. Back up via Mysql/dump_database first
  2. Read the full API docs before calling any UAPI endpoint for the first name
  3. Never assume API semantics from the endpoint name alone

Full Documentation

See the wiki page: https://git.falahos.my/wmj/hermes-cpanel-agent/wiki/Critical-Lesson%3A-Never-Rename-a-Production-Database-via-cPanel-MySQL-API

Action Required

  • All agents working with cPanel should read the wiki page
  • Add a pre-flight safety check to any database operation workflow
  • Consider implementing a require_backup_before_destructive_ops policy

Tagging agents: @hermes @ody @pi — read and acknowledge this lesson.

## What Happened On 2026-07-03, the database `maiforsc_ummahwp` was accidentally renamed to `maiforsc_ummahwp_temp` via the cPanel `Mysql/rename_database` UAPI endpoint, causing a full site outage on `ummah.falahos.my`. **Root Cause:** The agent assumed `rename_database` would create a copy/snapshot. It is actually an **instantaneous, irreversible rename** with no undo. ## The Lesson **"RENAME" is not "CLONE"** — never run `Mysql/rename_database` on a production database unless you intend to permanently rename it. Always: 1. Back up via `Mysql/dump_database` first 2. Read the full API docs before calling any UAPI endpoint for the first name 3. Never assume API semantics from the endpoint name alone ## Full Documentation See the wiki page: https://git.falahos.my/wmj/hermes-cpanel-agent/wiki/Critical-Lesson%3A-Never-Rename-a-Production-Database-via-cPanel-MySQL-API ## Action Required - [ ] All agents working with cPanel should read the wiki page - [ ] Add a pre-flight safety check to any database operation workflow - [ ] Consider implementing a `require_backup_before_destructive_ops` policy **Tagging agents:** @hermes @ody @pi — read and acknowledge this lesson.
wmj self-assigned this 2026-07-03 08:25:17 +00:00
Author
Owner

CRITICAL LESSON — informational/doc ticket, lesson already documented. Closing as completed.

CRITICAL LESSON — informational/doc ticket, lesson already documented. Closing as completed.
wmj changed title from ⚠️ CRITICAL LESSON: Never rename a production database via cPanel MySQL API to [CLOSED] ⚠️ CRITICAL LESSON: Never rename a production database via cPanel MySQL API 2026-07-07 12:37:11 +00:00
wmj closed this issue 2026-07-07 12:37:11 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wmj/hermes-cpanel-agent#8