How do i upgrade my debian 9 (stretch) to debian 10 without losing my data.
How do i upgrade my debian 9 (stretch) to debian 10. Is urgent i need to setup php8.1 on my vps but it seems not supported by debian9. Please i need help is urgent.
1 Reply
The current version of Debian is Debian 11 (Bullseye). I'd upgrade to that one…not Debian 10 (Buster).
The only absolutely safe way to do this is to spin up a new Linode with Debian 11 on it. Transfer all your important stuff from Debian 9 to Debian 11 while they're running in parallel. Don't be in a rush. Plan, plan, plan and then test, test, test.
When your satisfied that Debian 11 is running correctly, swap the IP addresses of Debian 11 & Debian 9 (see: https://www.linode.com/docs/guides/managing-ip-addresses/#transferring-ip-addresses).
Note that the IP address swap will only swap the IPv4 addresses. This is because of the way IPv6 addresses are allocated.
Spin down Debian 9 but keep it around!!!! Once you're satisfied that Debian 11 is running ok standalone, then you can delete Debian 9.
As always…backups (on both your systems) are your friends.
This solution will cost you a few bucks so the trade-off is money for peace of mind.
-- sw