Linux – How to exclude a package from yum-cron but not from manual “yum upgrade”

linuxmongodbyum

I've just gone through my servers and installed yum-cron (and then enabled with chkconfig yum-cron on since that doesn't seem to happen automatically).

Now I realise that I'm running a MongoDB cluster and that automatically upgrading the mongo-server packages could break and/or corrupt data.

I have considered adding exclude=mongo* to my yum.conf file to skip all mongo upgrades, but I would love to still be able to run yum upgrade manually and get all packages updated.

Is there a neat way of achieving this?

Best Answer

In /etc/sysconfig/yum-cron, there is an option called YUM_PARAMETER= which you can use to pass yum parameters to. For example:

YUM_PARAMETER="-x mongo*" 

The scope of that parameter seems to be limited to the yum-cron package.