Upgrade Ubuntu without losing data

HI! Is there a way to upgrade Ubuntu 20.04.4 to the latest version, without losing data? Thank you!

I would do both a TimeShift backup and save a copy the actual /home/* before doing the upgrade. From the instructions online if everything goes well, you won’t need to do anything special after the upgrade.

I decided to switch distro at the same time, so I did a fresh Ubuntu install, then install all of the apps I had. And when I copied the /home/* back in place, everything works just like before except for a few things like having to rename FireFox profile file name and such. But the saved /home/* is only if something goes wrong with your upgrade.

Some also suggest a TimeShift backup but luckly I didn’t have to restore from it…

2 Likes

Thank you @Ai for your response! I also owe you a response to your message, which I will do later today. :slight_smile:

/@Adry - yes there is a method. First, as AI said, back up your entire home folder to an external drive, which should be the /home/username where the username is your actual login name. Then, you would normally need to spot the repositories that are not the official ones (if you added any), from the Software and Updates app. Though I believe the new updater fixes that for you.

The next steps are thoroughly described in the article below. :slight_smile:

3 Likes

Hi @vasileios thank you so much for your response. I finally now have the time to do this, and while I am right now backing up my home folder I am wondering: is there a way that I also can copy the driver(s) that allow me connect to my wifi? That has been always a bit of a pain, of course I can fix it by tethering the wifi from my phone but if I can skip that step and just have the driver ready when installing the new OS, I’d be the happiest person :smiley: Thank you, I appreciate your help!

1 Like

I’m just going to way in here a tad bit. It’s personal opinion of mine to not do a full upgrade or dist upgrade etc., it almost always leads to issues, some very minor as Ai pointed out but some very time consuming, garbled libraries, dropped connection for weak WiFi signal, etc…

Now, with ANY upgrade, should should take the time to download the latest stable ISO, write a bootable USB and run the LiveCD to test out your equipment.

That said, I ran Ubuntu for years and it always recognized my Intel WiFi for all of my varying ThinkPad and HP and an old Compaq laptops, but I still ran their LiveCD to test it, every time. Since I dumped Ubuntu before 22.04 I cannot attest to that particular upgrade process.

As for preserving files, as mentioned above, best practice backing up /home/yourusername is to an external drive.

1 Like

Hey @Adry,
The WiFi drivers are - by default - sitting in the Kernel Module area, which is system-space. Therefore, when you copy your personal files, the drivers will not be copied. However, once the upgrade is complete, you will not have to re-install the drivers themselves.

If you do encounter a WiFi issue afterwards, please let me know and attach the output of the following command:

lspci

So that I can see the WiFi module your system is using.

1 Like