Score:1

Will any of my files be deleted while updating to 20.04

vu flag

I use UBUNTU 18.04.5 and I wanna update my system to 20.04 through the command sudo do-release-upgrade. Would I lose any of my personal files on the computer?

sudodus avatar
jp flag
No, not if they are stored in the home directory (and subdirectories of your home directory). But to be safe, you had better backup everything, that you cannot afford to lose before upgrading, and then set up a regular routine to backup your data. - Because some unexpected error can happen any time without a warning.
guiverc avatar
cn flag
No, but you should always perform backups of everything you value anyway (upgrades take a long time, power can go off, aeroplane crash into your house/office etc - unlikely, but we never know). FYI: If it does fail, you can also do a re-install without loosing data files too (*but you should always backup first, again easy to make a mistake, and any option that causes format will erase with re-installs).
cn flag
"Would I lose any of my personal files on the computer?" You do understand the concept of backups?
muru avatar
us flag
Does this answer your question? [Will upgrading Ubuntu remove installed software?](https://askubuntu.com/questions/788592/will-upgrading-ubuntu-remove-installed-software)
Score:3
in flag

If your personal files are stored in your /home directory, there is very little reason to believe that any of your personal files will be altered or lost. If you have personal files written all over the disk, then there are no guarantees.

Do note that upgrading the OS will also update a lot of the software and their individual settings files. There is a chance that things may temporarily appear weird if a config file is doing something non-standard. If you run a MySQL database locally, be ready for the engine to be upgraded to MySQL 8.0, which is a pretty big change from the 5.x versions that were standard with Ubuntu 18.04.

Generally I recommend people have backups in case of hardware failure and/or human error. When upgrading an OS, I recommend people have backups just in case things go sideways.

user10489 avatar
in flag
Just to underline your last point... upgrading the OS writes a lot of data to the disk. If your disk is about to fail, this i has a good chance to finish it off, which could take all your personal files with it.
Score:2
cn flag

The upgrade process was designed to not delete any of your personal files (so long as they are kept in the /home/yourusername/ directory, or on another, custom configured partition on the disk (that you (as a safety precaution) unmount and "unlink" (by commenting it out) in /etc/fstab beforehand)).

Yet, as things don't always work out 100% as planned, you could should do some safety preparations, to protect yourself from any unwanted consequences.

Before you perform the upgrade, prepare with two things:

  1. An external drive onto which you back up all your important files.
    • This could be a portable USB HDD (probably the fastest to set up), or a Network Attached Storage, or a Raspberry Pi with a HDD attached, or within another full-fledged computer that you connect to on your local network.
      • Be prepared: if you end up using NFS or CIFS protocols for this, you need to learn to set the connection up with suitable file ownership and permissions. This task alone is a pretty attention-intensive one, so grant yourself enough time and capacity to deal with this. Even if setting up a backup solution delays your intended upgrade by two / three weeks, be in the know that it's the right thing to do, and you are making the right deviation from your original plans. You should rely on such an arrangement anyways, and could see immense benefits from it in the future.
    • Do a backup of your data and verify that you can access it on this drive and you can restore files from there, should the need arise.
    • You may choose to use the tar utility to back up all config files found in your /home/yourusername directory.
  2. A live Ubuntu USB drive that you verify that you can boot from and initiate a "Try Ubuntu without installing" session
    • This could come useful if the on-disk OS gets a bit imperfect in the process, and you need to access the internal disk from a healthy, drop-in OS instance, let it be the system files- or any other partition.

If you are prepared in such ways, the upgrade can be an exciting adventure and a learning opportunity, instead of a gamble with too high stakes, otherwise.

Score:0
in flag

Updating shouldn't delete any files expect maybe some system utilities. Generally speaking your home folder should not be touched - even the configure files which are stored for the user.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.