1

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?

Thank you

2 Answers 2

5
  1. Backups. Do scheduled backups.
  2. Test your restores.
  3. Take the site down when you do updates.
  4. If you can't do that, re-architect it so that a single server going out of service won't impact your site, and then just roll the updates out one server at a time.

Step 4 won't be easy.

-1

Do not worry to much. On CentOS (probably on Ubunto too) when you make updates/upgrades with yum, basically no service is restarted. Apache is not restarted when you make updates/upgrades.

The only service that I remember, that is restarting during upgrade is ssh - but you do not loose a connection to the server.

Restarting service after upgrade is your decision. If you do it gracefully no data will be lost. If you plan to restart mysql it will be better if you stop the web site for a few seconds. Most of the people will not notice such a short downtime. I do not remember exactly the value but think that for a period of 4-5 seconds the timeout will not be noticed by tcp stack and application (browser)

1
  • CentOS does restart apache on upgrades (at least in 6.x) Ubuntu 12.x also does restart MySQL server after upgrades.
    – Socio
    Jul 18, 2013 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .