Results 1 to 6 of 6

Thread: Best way to upgrade?

  1. #1
    Join Date
    Sep 2015
    Beans
    18

    Best way to upgrade?

    I am upgrading from 18.04 to 20.04. I will do a fresh install (safest imho). What I struggle with every time I upgrade is what programs I have installed. I found apt-clone, but don't know if it is wise to blanket install everything that *was* installed or if there is a better way to handle this?

    I also struggle with best way to move mysql db's. Should I just export them (mysqldump) then import them?

    Thanks in advance for advice.

    J

  2. #2
    Join Date
    May 2010
    Beans
    1,901

    Re: Best way to upgrade?

    Code:
    sudo do-release-upgrade
    should kick it off. Obviously watch for gotchas if you run any fancy services (We have no detail about the system). For example, FreeRadius is significantly different in configuration style
    Last edited by ajgreeny; May 27th, 2021 at 02:57 PM. Reason: Typo corrected

  3. #3
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    1,228
    Distro
    Lubuntu Development Release

    Re: Best way to upgrade?

    I just completed an upgrade from bionic to focal which was done via upgrade via re-install.

    It was a desktop, and I used the "something-else", selected my existing partitions & did not format, so it

    - noted my installed packages
    - erased system directories
    - installed new system
    - added back the packages I had added to my system (if available in Ubuntu repositories for the new release)
    - no user file is touched (as they are in $HOME).

    Okay, I didn't realize my laptop had encrypted home (my mistake), so it failed, and I had to repeat the install (with package needed installed).. but I saw that as my fault for not exploring with a live system before hand (I booted it normally so never noticed the encryption).

    A release-upgrade is normally my first choice, but it takes a long time.. The upgrade via re-install (non-clean) I find super quick & easy (if you're not using encryption anyway.. encrypted home isn't offered anymore which I knew about; but forgot I was using).

    This upgrade via re-install isn't as good with servers though; as conf files are often kept in system directories (thus are wiped & need to be restored..) but it's greatfor desktops!

    Me, I usually clean my applications before the upgrade (less packages to release upgrade or re-install given how I just did it), especially if they're 3rd party. You get an error message if any can't be restored (using upgrade via re-install) so I do what I can to avoid any error message(s) & need to check out what couldn't be re-installed... (18.04->20.04, python2 is eol, Qt4 was eol already but is now gone etc).

    I'd always suggest reading the release notes first.

  4. #4
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Best way to upgrade?

    I would like to add: On a system with a separate /home partition that is not going to be formatted as part of the upgrade process, do not leave the upgrade unattended. If the upgrade process asks for user input and we are not there then upgrade will pause and may even stop if sufficient time pass by.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  5. #5
    Join Date
    Sep 2015
    Beans
    18

    Re: Best way to upgrade?

    I usually don't have great success with the release-upgrade. Not sure why, so I tend to install fresh. Maybe I will give it another try.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Best way to upgrade?

    What to backup?

    Work backwards from what is needed to restore:
    https://ubuntuforums.org/showthread....6#post13757986
    Not that anyone cares, but I do backups a little differently for a few reasons.
    * I do not backup the core OS.
    * I do backup data, lists of installed packages, system and personal settings.
    * My restore process begins by performing a fresh install of the OS with minimal setup (usually just an ssh-server)
    * Next I restore /etc/, /home/, and any server data (DBs, websites, nextcloud, wallabag, zimbra, etc).
    * Last I take a list of installed packages created just prior to making daily backups, and install those. They see the prior settings, accept those settings. They see the prior data and accept it. The restored system isn't 100% bit-for-bit identical, but the data and settings are. It also saves about 4GB of backup data per machine.
    Be certain the "local_backup" is somewhere included in your backups and secure enough that you don't worry about non-admin users seeing it. To get the list of manually installed packages:
    Code:
    apt-mark showmanual | tee $local_backup/apt-mark.manual
    To restore on the new system:
    Code:
    sudo apt-mark manual $(cat apt-mark.manual)
    sudo apt-get -u dselect-upgrade
    sudo apt-get -f install
    Some of the packages won't be available anymore, but most will.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •