arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Easy way to upgrade Debian 9 to Debian 10
#1
Hello Post4VPS Community

I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.

Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!


Let's get started with the guide.

1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).

2. First you have to get the current system up to date. To do so run the commands below in the order given.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.

Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.

3. Take a backup of your sources.list by using the command below.
cp /etc/apt/sources.list /etc/apt/sources.list.backup
(Don't forget to apply sudo before the commands if you use a non root user!)

4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.

Debian 10 package sources:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

You might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.

You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.

6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
apt-get --purge autoremove -y
(Don't forget to apply sudo before the commands if you use a non root user!)

7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.


This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.

This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.


[Image: zHHqO5Q.png]
#2
Man! You just anticipated me on this tutorial, I had already ready a word file with the text, only the typesetting was needed  Troll
I had to perform this on my VPS 9 so I was going to documentate this process.

Unfortunately I have to say that despite Ubuntu comes from Debian, Ubuntu on updating is more dangerous and often thing goes wrong. I tried a similar updating process on both Ubuntu and Ubuntu Server and seems that Debian handle the update better.

I was going to make a tutorial on updating CentOS 7 to CentOS 8, but this process isn't supported by the community and no official instructions are given. I tested it on a mininal CentOS 7 installation inside a VM and on a first seen seems to work, what do you think about it @"Hidden Refuge"?

CentOS 7 to CentOS 8 is a very BIG JUMP, a lot of things changes but well the new CentOS rocks!

Can I list this tutorial on my tutorial's list?
Thanks to Post4VPS and Bladenodefor VPS 14
#3
@LightDestory

I'm not a CentOS user anymore since at least over three years or even much longer. I never really tried or bothered to perform a distribution upgrade on CentOS because there basically was no word about it available in any official or inofficial documentation (at least searches always turned up totally unrelated articles or links to sites/guides where the upgrade process was described as impossible).

Try your luck I guess.

Yes, you can list this guide in your tutorial list Smile .
[Image: zHHqO5Q.png]
#4
I'm not much of a Debian user, but I do use it when I have to. For example, when setting up a Docker image and the idiosyncrasies of a software are too Debian-centric.

Anyway, for what it's worth, I can confirm that using the method outlined in the OP, it is possible to upgrade from Debain 8 (Jessie) to Debain 9 (Stretch) and from Debain 9 (Stretch) to Debian 10 (Buster) in two consecutive steps.

The only difference between my process and the OP is when it comes to editing the sources.list file:
> For Jessie to Stretch Upgrade:
root@kvm-Post2Host-Phoenix:~# sed -i 's/jessie/stretch/g' /etc/apt/sources.list

> For Stretch to Buster Upgrade:
root@kvm-Post2Host-Phoenix:~# sed -i 's/stretch/buster/g' /etc/apt/sources.list

I achieved this on Phoenix-based VPS-9 which came with Debian Jessie.

Never saw an OS that easy to upgrade!!.. but it felt weird for me to have to manage a non-RedHat-based Linux system.. The naming changes, the assumptions and on and on..

I did ask for an OS change though; the above was just for testing.
VirMach's Buffalo_VPS-9 Holder (Dec. 20 - July 21)
microLXC's Container Holder (july 20 - ?)
VirMach's Phoenix_VPS-9 Holder (Apr. 20 - June 20)
NanoKVM's NAT-VPS Holder (jan. 20 - ?)
#5
i have vps-9. can i do it myself to upgrade my debian? or i need admin assistance. vps-9 havn't virtualizer or cp.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#6
(04-07-2020, 01:23 PM)sagher Wrote: i have vps-9. can i do it myself to upgrade my debian? or i need admin assistance. vps-9 havn't virtualizer or cp.

This can be done on VPS 9 since it’s all done using SSH, no panel is involved 


HOWEVER, I do not recommend doing it on VPS 9. Since if anything goes wrong, you’ll then need to request an OS re-install which the admins can only do for you. And due to the fact that the admins constantly emphasize that VPS 9 owners should never perform anything risky, I doubt that they’ll be happy with that request.
Thank you Post4VPS and VirMach for providing me with VPS9! But now it’s time to say farewell due to my studies.
#7
(04-07-2020, 05:45 PM)ikk157 Wrote: This can be done on VPS 9 since it’s all done using SSH, no panel is involved 


HOWEVER, I do not recommend doing it on VPS 9. Since if anything goes wrong, you’ll then need to request an OS re-install which the admins can only do for you. And due to the fact that the admins constantly emphasize that VPS 9 owners should never perform anything risky, I doubt that they’ll be happy with that request.

Well it depends, updating Debian to a next major release (version installed to version_installed+1) is not a critical process and you can improve your success rate by doing the update process on a fresh install of the OS.

I personally did it after the KVM refresh and it worked without any issue.

This tutorial is super detailed and if you follow it you will get a fully updated and working Debian Smile
Thanks to Post4VPS and Bladenodefor VPS 14
#8
(04-07-2020, 11:39 PM)LightDestory Wrote: Well it depends, updating Debian to a next major release (version installed to version_installed+1) is not a critical process and you can improve your success rate by doing the update process on a fresh install of the OS.

I personally did it after the KVM refresh and it worked without any issue.

This tutorial is super detailed and if you follow it you will get a fully updated and working Debian Smile

Well you just described one of the issues, you’ll need to request a fresh OS install to increase your success rate. Which brings it back to my point.

I personally believe that you shouldn’t upgrade unless you really have to. Will save the admins here a lot of work. 

It’s just not a risk worth taking if you’re just upgrading for the sake of upgrading.
Thank you Post4VPS and VirMach for providing me with VPS9! But now it’s time to say farewell due to my studies.
#9
Thank you Hidden_refuse for the tutorial to update the Debian OS to 10. I have tried this and it works. I was able to update Debian OS in a VPS where the provider had some limited OS to work with.

Make sure you make backup when you update/upgrade anything.
#10
(12-07-2019, 06:19 PM)Mashiro Wrote:
Hello Post4VPS Community

I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.

Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!


Let's get started with the guide.

1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).

2. First you have to get the current system up to date. To do so run the commands below in the order given.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.

Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.

3. Take a backup of your sources.list by using the command below.
cp /etc/apt/sources.list /etc/apt/sources.list.backup
(Don't forget to apply sudo before the commands if you use a non root user!)

4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.

Debian 10 package sources:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

You might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.

You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.

6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
apt-get --purge autoremove -y
(Don't forget to apply sudo before the commands if you use a non root user!)

7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.


This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.

This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.


By doing this, all operating system settings will be poured together. In my opinion, the best backup way and installation of the operating system through the virtual server control panel. what is your opinion? Do not you think the corrupted settings may cause bigger problems in the operating system?
Thanks Post4VPS
Pages (2):



person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting