Click to See Complete Forum and Search --> : Putting 'apt-get update && apt-get upgrade' in cron
Is it inadvisable to put 'apt-get update && apt-get upgrade' in a cron file to run daily or weekly? I won't be able to regularly maintain this server once it is put into action, so I want it to download security updates automatically, but I am worried that upgrading a package may break some configuration. I am using Debian "Woody." Thanks.
valadil
07-27-2003, 03:16 AM
apt-get update should be totally safe. Hasn't screwed up either of my boxes yet.
I had apt-get dist-upgrade in my cron a while back, but was warned that that was a bad idea and that I should go with upgrade instead. I never bothered because I'd rather know whats being upgraded anyway.
scott_R
07-27-2003, 03:51 AM
you might want to set it up so that your cron version only installs files from selected sites, aka, the security updates. That way, you'll still know what's being updated, and anything you might not be ready for (i.e., dependencies that end up removing obsolete files that you may still be using), can be dealt with at your leisure. More complex, but probably better in the long run, depending on how critical your system is.
Syngin
07-27-2003, 01:28 PM
Sometimes with apt-get upgrade, there are user prompts though aren't they? Would they post to a current login window if that were the case or would apt hang?
z0mbix
07-27-2003, 02:13 PM
I have the following in /etc/cron.daily/
#!/bin/sh
#/etc/cron.daily/apt-get_update
apt-get -qq -y update && apt-get -q -y -d upgrade
# End
I then login when there are updates according to the mailing lists and run apt-get upgrade. I prefer not to run updates blindly.
Originally posted by z0mbix
I have the following in /etc/cron.daily/
#!/bin/sh
#/etc/cron.daily/apt-get_update
apt-get -qq -y update && apt-get -q -y -d upgrade
# End
I then login when there are updates according to the mailing lists and run apt-get upgrade. I prefer not to run updates blindly. That's a good idea... I think I'll do the same thing.