10+ things to consider when upgrading your Linux

1

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.

0. Documentation
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.

1. Backup!
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/)
    • /home/myuser
      including bookmarks, browser and mail data, VPN connections, SSH keys, GPG keys …
    • /etc
      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.:
      /usr/local/bin/
      And maybe fonts, licenses or certificates, if you fear, they could get lost.
    • Dump your databases, if you have any
      Could be

      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.

 2. Research
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:
https://blog.linuxmint.com/?p=3715
https://www.tecmint.com/upgrade-to-linux-mint-19/
https://www.zdnet.com/article/how-to-upgrade-to-linux-mint-19/
https://www.zdnet.de/88350139/linux-mint-19-1-tessa-ist-fertig-upgrade-nun-moeglich/

3. Preparations

  • 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.
  • Reboot
    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.)
  • Battery
    Check the battery, before you’re upgrading a notebook – yes there is a reason, why this point is here. Sigh.

4. Instructions
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.

5. Testing
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 …

 

 

Über den Autor

Karin Dunkl
Karin Dunkl

Karin Dunkl ist seit 2006 Software Entwicklerin bei artindustrial it. Sie ist Expertin für Software Architektur und Java Web Entwicklung.

Karin Dunkl Von Karin Dunkl

Hier finden Sie uns

Adresse
Mariahilferstrasse 111/6-7
1060 Wien
Kartenansicht

Öffnungszeiten
Montag – Freitag: 9–17 Uhr

Kontakt
Mail: office@artindustrial-it.com
Tel.: +43 1 5954023

Support

Hier finden Sie Unterstützung zu unseren angebotenen Services.

Folgen Sie uns