Server Maintenance mode or only read mode during a VMware Esxi Maintenance


Well-Known Member
Jul 30, 2013
cPanel Access Level
Root Administrator

I need advice to leave the server in a read only mode in an easy way.

The problem that I have is about a Esxi Maintenance or to avoid single point of failure.

I have two situations were the server is hosting all the services except databases and other that include everything but no mail server.

But while I am in maintenance mode I had the idea to use the full backup/clone of the server as a temporary server but in read only mode, to avoid lost emails, files or database transactions during that time.

Emails action
So my idea about the emails it's simple block all the ports related so IMAP clients or servers trying to send emails using a simple script in CSF or IpTables not sure if is the best option.

Files action
I am not sure about this one probably I can do something with the permissions of the folders so ftp or upload script will fail, probably I will add a message in the configuration of Apache and the FTP server that will be on the top of all the webpages so users can know that the server is temporally in maintenance read only mode.

MySql action
I found this in stackoverflow
shell - How do I set MySQL temporarily to read-only through the command line? - Stack Overflow

read only mode:

SET GLOBAL read_only = 1;

and back to normal mode with:

SET GLOBAL read_only = 0;

The situations not include an IP or DNS change, and the backup/cloned server version will be discarded unless something very bad happen to the production server (DAS, RAID 1)

What others thing should I take care? I think the email database scenario it's the worst since some client can lose an important email or some transaction in the database.
Last edited:


Staff member
Apr 11, 2011