Checklist – when upgrading your Linux (Mint/Ubuntu)
This is not a step by step tutorial, this is a general checklist when upgrading your Linux system. It’s based on Mint/Ubuntu, but can roughly be used for other Linux distributions too.
It originally had only 10 bullet points, but is now grouped in various sub-bullets for better overview.
Checklists are a great thing when doing complex, longsome or recurring stuff. It’s timesaving and efficient for tasks you do once in a while or quite often, but not as often to keep all doings in mind. And occasionally it’s funny or interesting when you see, what comments you made on single items and do not need anymore, showing you have improved since then! 🙂
Sometimes an even more interesting thing are checklists of others. To consider the unthought or just see what other people put in their checklists. So that’s why I’m sharing mine now.
Continuous documentation – Whenever you change something in your system outside your home directory, that should be backed up when upgrading, write it down in a file like MyAdaptions.txt.
There is the German saying „Mut kann man nicht kaufen …“ sometimes complemented with „…, aber Blödheit gibt’s gratis.“ which means: “You can’t buy courage, but stupidity is for free.”
From my experiences I can tell, you never know, what happens during an upgrade. Everything is possible – I’m not joking! Therefore it’s up to you, which of the following backup options you choose. It’s your data, better not demonstrate stupidity in the end.
I prefer A and B together or just B to prevent loss of data or wasted time for feature x that you painfully added to your system months ago and that could be gone after the upgrade:
- A: Full image/snapshot of your system with your favourite imaging/snapshot-tool.
- B: Partial backup – back up only your home directory and other relevant config/data to an external device.
Here is, what I back up, when not doing a full backup. Typically with rsync and a varying amount of options e. g.:
sudo rsync -rcvlptgo --exclude=unimportant-directory /home/myuser /media/myuser/backup-dir/)
including bookmarks, browser and mail data, VPN connections, SSH keys, GPG keys …
Or if you know, what you need, just the specific dirs like cron jobs, apache/nginx config, fstab, resolv.conf, hosts …
- Custom script adaption or tweaks you made inside system directories outside your home directory and hopefully are documented inside MyAdaptions.txt e. g.:
And maybe fonts, licenses or certificates, if you fear, they could get lost.
- Dump your databases, if you have any
mysqldump -u root -p dbname > /media/myuser/backup-dir/dumps/dbname_timestamp.sql pg_dump -F c -f /media/myuser/backup-dir/dumps/dbname_timestamp.pgdump dbname or a dumping tool for your NoSQL database ...
- Make a screenshot of your Desktop, if you emphasize a specific arrangement of your items, most of the time the icons get mixed up.
- Save additional custom program settings that are not stored inside your home dir (or customized menu-bars, language settings, custom shortcuts etc.). Use a program’s export function, if available.
I don’t do this very often anymore, because I like to browse the settings of a program’s newer version and discover new features. At the same time I can check, if old settings are still needed or in need of a change.
- C: No backup at all – really not recommended.
Got to the website of your distribution and see what upgrade info is provided for your version. Additionally search the web for guides/checklists of whoever did that upgrade already. It was always worth the time.
Useful commands to find out your Linux/Distribution version could be:
uname -a cat /proc/version cat /etc/*-release …
Just for example these are some of the tutorials I consulted lately:
- Some decisions need to be made.
First, do you need/want to upgrade or are you satisfied with your (long time support) version and support is still there?
And if you need/want it, do you have to do it right now? Because if you are not that experienced and you are upgrading to a brand new release, it could be advantageous to wait for some experts to publish guides and bugs, before you stumble across them.
Furthermore you need to decide to which version you want to upgrade. Often this depends on what is recommended for your Linux distribution. In my case I first had to upgrade from Linux Mint 18.1 to 18.3 and then upgrade to 19.1 from there.
- Try it out!
If your research showed relevant kernel or other changes and your distribution provides a live CD/DVD/USB, just try running it, before you upgrade. At least you get a live feeling of major changes, before using it.
- Pending updates
Install all your pending or recommended updates.
Restart your machine and stop potentially interfering stuff like Docker containers. (Okay this won’t be necessary in most cases, but since I once really had problems, because of not rebooting before an upgrade, I just do it now. At least it wouldn’t be amiss to upgrade with a freshly rebooted system.)
Check the battery, before you’re upgrading a notebook – yes there is a reason, why this point is here. Sigh.
Finally follow the instructions of your favourite step by step guide. Take a deep breath 😉 and press “Upgrade to …” in your Update Manager or enter something like “apt update; apt upgrade” into a terminal.
After the upgrade is complete, reboot and check the most important functions/programs. For me that’s usually:
- network connections (especially WLAN, VPN),
- handling of multiple monitors,
- general check on multimedia input/output and different formats from music to videos,
- battery-status and energy-management on notebooks,
- does the resume or hibernate functionality work better or worse than after the last update ,
- do changes in files like .bashrc work as usual,
- is my custom gnome-panel bootstrapping script still working,
And still, if you have problems, anyway you have a backup – unless you chose backup option C and tempted the gods of data 😉
So good luck with fixing or searching for alternative programs! At least for my systems there’s always something to fix or improve …