Automatic background updates

NoOp glgxg at sbcglobal.net
Thu Dec 10 01:55:31 UTC 2009


On 12/09/2009 10:41 AM, Liam Proven wrote:
> Is there an "official" way to do this, rather than just using cron to
> schedule a script that says something like...
> 
>   apt-get update
>   apt-get upgrade -y
> 
> ...?
> 

One thing to keep in mind is that (once you get this working to your
liking) is that the auto upgrade will go out and fetch updates in the
background, and in the process the download can saturate your existing
network connection. For this reason I add an apt download limiter by
placing an /etc/apt/apt.conf file on all of my systems. The following is
what I use for a 1.5Mb DSL line, it keeps the download to 1Mb so that I
still have 500Kb of bandwidth to browse etc.

$ cat /etc/apt/apt.conf
//---------------------------
// Options for limiting Update Manager download speeds
Acquire
{
Queue-Mode "access";       // host|access
http
{
Dl-Limit "100";        // 100Kb/sec maximum download rate
};
};
//--------------------------

Just adjust 'Dl-Limit "100"' to whatever you need.

In the past when I had auto update set for customers/relatives etc.,
they'd be doing something & all of a sudden thought that they had
network and machine problems. Updates were soaking their connection &
then the updated installs were soaking the cpu during the installs. So
now I just add the apt.conf file and drill it in their heads to click
and perform the updates when they see the notification on the desktop.
(realise you aren't talking desktop, but the same file helps on my test
servers as well).





More information about the ubuntu-users mailing list