Upgrading Debian Versions: Difference between revisions
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Upgrading from Debian Buster to Debian Bullseye is relatively straightforward, but we've only been able to test upgrades on servers with Mythic Beasts, so while this may work with other hosting providers we can't support upgrades with them, as the initial server state may conflict. | Upgrading from Debian Buster to Debian Bullseye is relatively straightforward, but we've only been able to test upgrades on servers with Mythic Beasts, so while this may work with other hosting providers we can't support upgrades with them, as the initial server state may conflict. | ||
As with any significant upgrade, ensure that any sites or software are compatible with the new versions, and you have full, recent, verified backups. | If you have a Managed Sympl Server with Mythic Beasts, just contact support and they will be able to handle the update for you. | ||
As with any significant upgrade, ensure that any sites or software are compatible with the new versions, and that you have full, recent, verified backups. | |||
The major changes for Sympl in between Debian Buster and Bullseye are: | The major changes for Sympl in between Debian Buster and Bullseye are: | ||
Line 19: | Line 21: | ||
Next, replace the current Sympl sources.list file with one for buster (if you didn't use the Sympl installer or installed it manually, your filenames may vary): | Next, replace the current Sympl sources.list file with one for buster (if you didn't use the Sympl installer or installed it manually, your filenames may vary): | ||
sed 's|buster|bullseye|g' /etc/apt/sources.list.d/sympl_buster.list > /etc/apt/sources.list.d/sympl_bullseye.list && rm /etc/apt/sources.list.d/sympl_buster.list | |||
Move the existing distribution sources.list out of the way. | Move the existing distribution sources.list out of the way. | ||
mv /etc/apt/sources.list /etc/apt/sources.list_buster_$( date +%s ) | |||
Then create a new distribution sources.list with the new distribution codename. | Then create a new distribution sources.list with the new distribution codename. | ||
<nowiki>echo "deb http://mirror.mythic-beasts.com/debian/ bullseye main | |||
deb-src http://mirror.mythic-beasts.com/debian/ bullseye main | |||
deb http://security.debian.org/debian-security bullseye-security main | |||
deb-src http://security.debian.org/debian-security bullseye-security main | |||
deb http://mirror.mythic-beasts.com/debian/ bullseye-updates main | |||
deb-src http://mirror.mythic-beasts.com/debian/ bullseye-updates main" > /etc/apt/sources.list</nowiki> | |||
Update the apt data. | Update the apt data. | ||
apt update | |||
Verify there will be enough disk space for the upgrades. | Verify there will be enough disk space for the upgrades. | ||
apt -o APT::Get::Trivial-Only=true full-upgrade | |||
At this point, if apt mentions theres not going to be enough disk space, then you need to clear some space. | At this point, if apt mentions theres not going to be enough disk space, then you need to clear some space. | ||
Line 48: | Line 50: | ||
=== Upgrading === | === Upgrading === | ||
Beyond this point, services will be disrupted, and you should expect around 30 minutes downtime. | '''''Important'': Beyond this point, services will be disrupted, and you should expect around 30 minutes downtime. There's no going back without restoring backups, so be extra sure you have working backups before continuing.''' | ||
Upgrade any packages which don't have new dependencies. When prompted, answer 'yes' to restart services without asking. | Upgrade any packages which don't have new dependencies. When prompted, answer 'yes' to restart services without asking. | ||
Line 100: | Line 103: | ||
Finally, manually check sites look as expected. | Finally, manually check sites look as expected. | ||
== Upgrading from Debian Stretch == | == Upgrading from Debian Stretch == |
Latest revision as of 12:22, 1 September 2022
Upgrading the version of Debian on a server running Sympl can be tricky, as initial dependencies and packages on the server can vary.
Upgrading from Debian Buster
Upgrading from Debian Buster to Debian Bullseye is relatively straightforward, but we've only been able to test upgrades on servers with Mythic Beasts, so while this may work with other hosting providers we can't support upgrades with them, as the initial server state may conflict.
If you have a Managed Sympl Server with Mythic Beasts, just contact support and they will be able to handle the update for you.
As with any significant upgrade, ensure that any sites or software are compatible with the new versions, and that you have full, recent, verified backups.
The major changes for Sympl in between Debian Buster and Bullseye are:
- PHP7.3 has been updated to PHP7.4, information on the changes are available on the php.net site.
- Web statistics application Webalizer has been replaced with AWFFull.
Preparatory Work
First, you should apply any pending updates for the operating system, and Sympl:
apt -y update && apt -y upgrade && apt -y dist-upgrade && sympl update
Next, replace the current Sympl sources.list file with one for buster (if you didn't use the Sympl installer or installed it manually, your filenames may vary):
sed 's|buster|bullseye|g' /etc/apt/sources.list.d/sympl_buster.list > /etc/apt/sources.list.d/sympl_bullseye.list && rm /etc/apt/sources.list.d/sympl_buster.list
Move the existing distribution sources.list out of the way.
mv /etc/apt/sources.list /etc/apt/sources.list_buster_$( date +%s )
Then create a new distribution sources.list with the new distribution codename.
echo "deb http://mirror.mythic-beasts.com/debian/ bullseye main deb-src http://mirror.mythic-beasts.com/debian/ bullseye main deb http://security.debian.org/debian-security bullseye-security main deb-src http://security.debian.org/debian-security bullseye-security main deb http://mirror.mythic-beasts.com/debian/ bullseye-updates main deb-src http://mirror.mythic-beasts.com/debian/ bullseye-updates main" > /etc/apt/sources.list
Update the apt data.
apt update
Verify there will be enough disk space for the upgrades.
apt -o APT::Get::Trivial-Only=true full-upgrade
At this point, if apt mentions theres not going to be enough disk space, then you need to clear some space.
Upgrading
Important: Beyond this point, services will be disrupted, and you should expect around 30 minutes downtime. There's no going back without restoring backups, so be extra sure you have working backups before continuing.
Upgrade any packages which don't have new dependencies. When prompted, answer 'yes' to restart services without asking.
apt -y upgrade --without-new-pkgs
Update the rest of the packages, including installing new ones. When prompted, answer 'yes' to upgrade the Roundcube database, and 'keep' the modified roundcube configuration file.
apt -y full-upgrade
Update a missing dependency:
apt -y install guile-2.2-libs --only-upgrade
Cleaning Up
Remove any extra packages which are no longer needed:
apt -y autoremove
Fix up the MySQL and PureFTPd services:
systemctl disable mysql.service systemctl enable mysql.service rm /etc/pure-ftpd/auth/* ln -s ../conf/ExtAuth /etc/pure-ftpd/auth/60Ext
Upgrade any web stats to the new format
find /srv/*/config -maxdepth 1 -mindepth 1 -name 'stats' | sed 's|/config/stats||' | while read path ; do awffull_history_regen --dir "$path/public/htdocs/stats" > "$path/config/.webalizer.hist"; done
Restart the server to apply the new kernel.
shutdown -r now
Confirming The Upgrade
Reconnect to the server, and check it's reporting it's running on Debian 11, with a 5.10 Kernel
lsb_release -a ; uname -a
List the versions of the sympl packages, each one should start '11.
'
dpkg -l 'sympl-*'
Run the watchdog, and check it reports no issues.
sympl-monit
It should take a few seconds to run but will return immediately with no output if it's already running or load is too high. You should be okay to repeat until you get a result and everything should say 'PASSED'
Finally, manually check sites look as expected.
Upgrading from Debian Stretch
At present we don't have enough data to confirm if a server running Debian Stretch with Sympl can be safely upgraded to Debian Buster, therefore it's not something we can support at present.
For this reason, we suggest migrating your configuration to a new server running a more modern version, rather than upgrading the current one.