I'm going to use a server running Ubuntu Linux or CentOS for my projects. The server will not be managed by the hosting company, I will manage it myselff. I have been working with Ubuntu and CentOS for a few years now, so it is comfortable for me to do administrative tasks on this kind of servers.
But I am doubtful about software updates. It is no problem to update it using package manager (for example, apt-get in Ubuntu) but I am not sure how to keep the data safe.
A small example. Let's assume there are a lot of user requests to the server at the time when I start a software update. Package manager updates Apache and MySQL servers. These servers will be stopped, updgraded and restarted. What happens to the data in the MySQL database? May it be damaged by this procedure (because of incomplete requests, for example)? And how can I update the server software and avoid a damage to the data?