What is the best way to upgrade a linode from Debian 8 to Debian 10?
I want to upgrade my Debian 8 linodes to Debian 10. I can think of two possible ways to do this. I'm wondering if anyone here has done this and could suggest which of the two following procedures would work best?
Procedure 1
Create an entirely new Debian 10 linode and (somehow) copy the software from the old Debian 8 system to this new system. Get it all working, and then swap IP addresses and eventually decommission the old system.
Procedure 2
Do a clone of the old Debian 8 linode, and then use "apt" to upgrade the new linode up to Debian 10. Get it all working, and then swap IP addresses and eventually decommission the old system.
I can see advantages and disadvantages in both methods. Which do you folks recommend?
Thank you in advance.
7 Replies
There's also:
Procedure 3
Do a snapshot & then try an in-place upgrade using do-release-upgrade. Restore the snapshot in case something is screwed up after you're done.
-- sw
P.S. You write:
Create an entirely new Debian 10 linode and (somehow) copy the software from the old Debian 8 system to this new system.
"somehow" = scp(1) or rsync(1).
Thank you very much.
Hmm … maybe I'll try the do-release-upgrade procedure first, and if it doesn't work, then I can go down the path of "Procedure 1".
I know about scp and rsync (and I think rsync is better in this case, because it will only update files that differ between the two machines).
I said "somehow" in my original post because I want to make sure I know what to transfer to the new system and what not to transfer. As an obvious example, I know that I definitely shouldn't copy /usr/bin from the old system to the new one.
Conversely, I know that copying /home will be fine.
But as for /etc, for example, there are some things there I would want to copy and some things I would not copy. The same is true for /var and some other directory trees.
Is there some utility I can run which will give me the names of all the files on my Debian 8 machine which differ from the files on a newly installed Debian 8 linode? If so, that will give me a good idea of what I need to copy to the Debian 10 linode.
Oh … another question. If I do an apt-based upgrade or a do-release-upgrade, should it be done in two steps, i.e., Debian-8-to-Debian-9 and then Debian-9-to-Debian-10, or can I go directly from Deb-8 to Deb-10 with one or both of these?
I wouldn't be rsync'ing /etc or /usr/bin from one system to another ;-) That's the good thing about do-release-upgrade…it updates packages that installs things in the right places and leaves local changes (in places like /etc) in place and saves the default so you can always figure out how your configuration is different from the default.
You write:
Oh … another question. If I do an apt-based upgrade or a do-release-upgrade, should it be done in two steps, i.e., Debian-8-to-Debian-9 and then Debian-9-to-Debian-10, or can I go directly from Deb-8 to Deb-10 with one or both of these?
You'll have to take this issue up with Debian or one of their expert proxies. I've always had good success with do-release-upgrade on Ubuntu (a downstream derivative of Debian). The transition from Deb-10 to Deb-11 will be my first with Debian.
-- sw
I just realized that "do-release-upgrade" is an Ubuntu utility, and unless I'm missing something, that program doesn't exist for Debian itself.
I haven't been able to find a Debian-based counterpart to "do-release-upgrade". Does anyone know of such a utility?
All I have been able to find are descriptions of a several-step apt-based upgrade procedure for Debian. Is that the best I can do?
This seems to provide the answer:
https://www.addictivetips.com/ubuntu-linux-tips/upgrade-debian-linux-new-release/
The good thing in all this is that Debian doesn't change very often. I'm bookmarking this too…
-- sw
Thank you. Yes, I have already seen and bookmarked a few pages with this same info. It's the "several-step apt-based upgrade procedure" that I referred to above. I guess that's the best we can do under Debian.
Luckily, it doesn't look too onerous.
I have now completed the Debian-8-to-Debian-10 upgrade.
First, I upgraded successfully to Debian 9. I followed these instructions, and there were no problems:
https://www.itzgeek.com/how-tos/linux/debian/how-to-upgrade-debian-8-jessie-to-debian-9-stretch.html
I then went here for the Debian-9-to-Debian-10 instructions (they're pretty much the same instructions as what @stevewi mentioned above … I just already had this page bookmarked):
https://www.cyberciti.biz/faq/update-upgrade-debian-9-to-debian-10-buster/
There was a small snag: I was using the "dotdeb" apt repo, but it no longer is being maintained and doesn't have any "buster" content. After removing the reference to that repo and re-running "apt update", that step and the rest of the steps succeeded.
Also, I recommend doing this via "weblish" or "glish", because I first tried it via ssh-ing into the host, but during the procedure, sometimes sshd or other software was bounced, and I then could no longer interact via the ssh session.
Aside from these small issues, everything went well, and now …
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Excelsior!