Documenting this as it’s the process I followed for upgrading Debian on the VM that runs this blog and others, for the purposes of having notes for next time and in case it helps others. Please do not consider it complete, if it breaks your upgrade you get to keep both parts..
- Ensure all current updates to Debian and installed
- Firewall the VM from all external access to quiesce activity and prevent email delivery and web access before it’s all tested
cd /etc; etckeeper commit "Commit any uncommitted pre-upgrade changes"– Make sure there are no uncommitted changes in /etc
- Change /etc/apt/sources.list to point to the new Debian version
apt-get install debian-archive-keyring– to ensure current PGP keys are in place to verify the archive
postconf -e "soft_bounce = yes"Set Postfix to do soft bounces in case of issues bringing things back up
- Stop all web and email services
- Comment out all crontab entries for amavis
- Ensure Maia Mailguard has processed all its outstanding quarrantined items by running the script by hand.
- Do a full mysqldump, copy it offline
- Stop MySQL to quiesce it
- Use the hosting providers web interface to take a snapshot backup of the current state, just in case..
script -f upgrade– log everything to a log file
- Start Postfix only so apt-listchanges can email news to root
apt-get update && apt-get dist-upgrade– do the actual upgrade!
- Fix all the things. 🙂