Over time I've generated a proliferation of Ubuntu servers, and its starting to get tiresome keeping them all up to date.
If I SSH in a particular server, and notice it needs an update, I just fire off sudo screen -d -m apt-get -y dist-upgrade
and forget.
This seems to be an inefficient and slightly reckless way of keeping my servers up to date.
Are there better solutions?
Also, this update process occasionally requires that the server be restarted. As a result, none of my servers have an uptime of more than a month. But other people are boasting that they've got uptimes in the region of years. How is this possible?
Cheers.
Each time your kernel is updated, you need to reboot.
There is a technique to avoid this ( http://www.ksplice.com/ ) but it seems not yet be in use.
Those people with high uptime maybe never update their kernels, or they use other systems than Ubuntu.
Ubuntu uses quite recent software, to the probability of updates might be a bit higher. If you use older versions, there might be less updates because the software is more "mature". Anyways, this is just a very rough estimation and can change a lot in praxis.
I use apticron to get informed by mail if an update needs to be done.
In your case, I would use "cron-apt" or "unattended-upgrades" to do the job of automagically updating your machines.
Nevertheless, you need a reboot, if the kernel gets an update or upgrade.
High uptimes mean "I never updated my kernel, try to hack me ..." ;-)