Debian 10 to Debian 11 in place upgrade

OS type and version Debian 10
Virtualmin version 7.3

Having searched the documentation and forums, I have not found an officially recommended way to upgrade Debian 10 to Debian 11.

Is there an official recommendation? If so, can it be added here? Upgrades and Migrations – Virtualmin

Hi @en3r0 ,

I was standing these day in front of this problem as well. I did some research and the best solution for me was actually to spin up a new Debian 11 VPS server. After this I moved all the Virtual-servers to the new one.


Upgrading distros is not within the scope of support that Virtualmin offers. You’d have to read about this kind of stuff at the distro website, however often a which Google search will turn up some good articles on the topic from those who’ve been through the process already.

Yeah, we haven’t had time to document an upgrade, though I would expect the old docs to be pretty close to reasonable for new upgrades.

The trickiest upgrades were back when one would have to go from non-systemd (either initscripts or upstart) to systemd…those days are long gone, and the past several years worth of Debian/Ubuntu and RHEL-based distros are systemd, so the upgrade isn’t painful, generally.

But, of course, the most likely to be successful and in a known good state would be to start with a fresh OS and migrate backups. But, if you’ve heavily customized your server (beyond just Virtualmin configuration, which can be backed up and moved easily), it may be more challenging to go that route.


I would also recommend setting up a new fresh server with Debian 11 and migrating… but here’s the cheat sheet I put together for 10 to 11 in-place upgrade:

Upgrade Debian 10 to Debian 11 Bullseye using the CLI

Step 1. Backup your system

lsb_release -a
uname -mrs
cat /etc/debian_version

Step 2. Update ALL existing installed packages

sudo apt-mark showhold # list any pkgs in hold status
sudo apt-mark unhold package_name # remove the host status for all listed packages one-by-one

sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt --purge autoremove
sudo systemctl reboot

Step 3. Update /etc/apt/sources.list file

sudo vim /etc/apt/sources.list # change all references from Buster to Bullseye

# Debian 11 Bullseye
deb Index of /debian bullseye main contrib non-free
deb-src Index of /debian bullseye main contrib non-free
deb Index of /debian-security bullseye-security main contrib non-free
deb-src Index of /debian-security bullseye-security main contrib non-free
deb Index of /debian bullseye-updates main contrib non-free
deb-src Index of /debian bullseye-updates main contrib non-free
#deb Index of /debian bullseye-backports main contrib non-free
#deb-src Index of /debian bullseye-backports main contrib non-free

(additional virtualmin lines here)

sudo apt update

Step 4. Minimal system upgrade

sudo apt upgrade --without-new-pkgs # avoid the removal of large numbers of packages that you want to keep

Step 5. Upgrading Debian 10 to Debian 11

sudo apt full-upgrade
sudo systemctl reboot

Step 6. Verification

uname -r
lsb_release -a

Maybe remove unneeded packages

sudo apt --purge autoremove

1 Like

Tried these steps and even resolved issues with packages not upgrading correctly but still ended up with virtualmin not booting after a restart. Guess I should just bit the bullet and do a fresh install.

Or you could post what errors you get and we could help you solve it. It’s probably nothing serious; I’d be much more worried about everything other than Virtualmin/Webmin.

If I give it another go I will definitely do that, what logs would I look in for virtualmin errors?

Here are some I use:

journalctl --no-pager
journalctl -n 20
journalctl -f
journalctl --since “1 hour ago”
journalctl --since “2 days ago”
journalctl --since today
journalctl --since yesterday
journalctl -b
journalctl -u mysql.service -f
journalctl -n 50 --since “1 hour ago”
journalctl -u sshd.service -r -n 1

1 Like

Virtualmin, specifically, logs to the Webmin logs, which are in /var/webmin. Why it won’t start would either be in /var/webmin/miniserv.error or in the journal for the webmin unit.

(Hi @Joe and @Ilia :wink: … back from some RL challenges incl surgery this past Friday LOL)

Looks like it’s time for me to make this attempt. Perhaps I can contribute some to the KB on in-place upgrades along the way.

I have an additional related question:

  • Background: I’m running Webmin/Vmin in a VM on Proxmox. It’s my “important” home email server so I don’t want to break things for long :wink:
  • Seems the safe thing to do is replicate my *min VM and do upgrade attempts on the copy
  • HOWEVER, I don’t want the copy to break my real-world server…
  • QUESTION: Do y’all have any hints, let alone a crib sheet, for turning a replica of a live server into a safely non-interfering sandbox for testing?
    • Seems that this ought to be a pretty common task for supporting client systems…



Always backup before conducting a major OS release. While Debian based distros have improved significantly over the past few years in terms of handling upgrade tasks, nothing is ever perfect, remember you are going to see “breaking changes” between major OS versions.

It’d also be a good idea to earn from the Debian website what kind of “breaking changes” should be expected so you can prepare for any oops moments should something not go as planned.

Personally, I look at major OS upgrades as an opportunity to install a new, fresh environment, conducting a cleanup of things and using new found knowledge to build a better stack, then migrate accounts over.

In the case of email, I’m in the process of doing this for a large client with mailboxes in the GB sizes.

The strategy aside the above is to “sync” mailbox content numerous times until the day of the switch over (domain mapped to new IP).

After that, I’ll do a few final syncs to make sure a few last messages that may have accidentally been delivered to old server are synced with new one.

This process gives the impression to users as if the server never went offline as the impact is minimal.

*** Professional, Affordable, Trusted Technical Assistance – ***

@tpnsolutions of course backups, etc. What I’m looking for is in terms of discovering breaking bits during an in-place upgrade. For that kind of lab work, I’ll need a copy of my current running setup :wink:

(FWIW, my setup is likely about as complex yours, even though we’ve only got a few GB of email. We host a couple dozen domains, and serve people worldwide who have legit security concerns. And we have domains that have been around for decades, which also complicates life a little. :wink: )

I thought I’d already responded to this thread, but apparently not. :slight_smile:

Since you’re running Proxmox, just do a snapshot of the server before you start the upgrade.
In case of 10 → 11 you shouldn’t worry about mail services being down.
I upgraded all of my servers just a few days after release, so long before Virtualmin actually supported 11, and the only issue I had back then was with ProFTPD.
There are no other major changes when upgrading this time around, so it should be really problem free, but again, snapshot/backup your heart out :slight_smile:

This doesn’t make sense, surely you mean RPM based distros, right, since they didn’t have an upgrade option at all until lately?
Debian always upgraded well.

I have servers that started life as Deb 3 and have since been upgraded, migrated from 32 to 64 bit and so on, still going strong.
The biggest issue was from 5 → 6 (or was it 6 → 7?) when both Dovecot and Apache had major version changes with massive config differences. That was a difficult one on the first server…
Since then it’s really been smooth sailing again in regards to upgrades.

Just my 2 cents :slight_smile:

1 Like

couldn’t have said it better than @toreskev , +1. almost same experiences as well…

latest 3-4 debian releases dist-upgrades have been flawless…

1 Like

@toreskev @dimitrist,

Major OS upgrades introduce “breaking changes”, a term which can sometimes do exactly that, break things.

Regardless, distros have gotten better at reducing this significantly, but one of the biggest determining factors is what you have installed and when you do the upgrade as well. Though in general because of major changes, there’s always a potential of the new way the distro does things may “break” the way old software did it.

Be mindful of this fact, make backups as recommended then worry less if things don’t go well as you have a path to recovery.

I like a clean install on a server for the reasons mentioned previously.

Dude, it’s like you didn’t read a single word I wrote.

Debian has been good in this regard for over 20 years, if this is recently for your, then by all means.
They make it a point not to need a reinstall, but rather upgrade.
They don’t introduce breaking changes, apart from when they really have to, and then they really warn you about it in the release notes.
It’s not like Ubuntu who silently changes a config that breaks stuff in an LTS release…

I’m not saying you shouldn’t keep backups, you most definitely should, that’s a whole different point.
But you do you, spend hours reinstalling, transferring backups and remembering where you put all those little extra snippets and modifications done over the years.
I’ll just take 5 minutes upgrading instead, which like here from 10 → 11 is not an issue.

But backup backup backup :slight_smile:

1 Like

I just did a spin up on a host that only offers 10. Went to the Debian wiki and followed the documentation on upgrading from 10 to 11. No problems other than the documentation was a tad verbose. :wink:

Hi, regards update from 10 to 11 just do apt distro… When terminal aks you something read it and as usually do y or replace…went smoothly for me .also make sure backup is in place. There’s no issue updated from 10 to 11.

That’s wonderful to hear!

I’ll at least attempt a “quick” in place upgrade before going the slow route…

YES with proxmox I can snapshot and backup the server in seconds. It’s one of the things I love about that.