Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2025-05-08 09:17:55

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 570

Re: Adventures in Linux Land

I’m looking to upgrade from Percona Server 8.0 to 8.4 on my Debian server. After doing some research I found these instructions.

Is this a good way to upgrade to new versions or are there better ways of doing so? I’m very new to Percona Server and still finding my feet.

1. Backup my.cnf so it doesn’t get overwritten.

2. Stop the 8.0 Server.

sudo systemctl stop mysql

3. Switch to the Percona Repositories

sudo apt update
sudo apt install curl gnupg2 lsb-release
curl -0 https://repo.percona.com/apt/percona-release_latest.generic_all.deb \
  -o percona-release_latest.deb
sudo apt install ./percona-release_latest.deb
sudo apt update
sudo percona-release setup ps-84-lts

4. Install Percona Server 8.4

sudo apt install percona-server-server

5. Merge any custom settings from your old my.cnf into the new one. Watch out for changed defaults in InnoDB parameters and removed plugins (e.g. mysql_upgrade is gone in 8.4) — you may need to switch to the new component-based equivalents.

6. Start the upgrade

sudo systemctl restart mysqld

7. Post-Upgrade Checks

  • Connect and run a few SELECT VERSION() / SHOW VARIABLES LIKE 'version%'; to confirm 8.4.
  • Run CHECK TABLE …; or pt-table-checksum across schemas to verify data integrity.

——

Edit

Okay, after some further digging I found the Percona Docs page. Percona Docs: Upgrade using the Percona repositories

Still, if anyone has any general advice when upgrading Percona, best practices, gotchas, etc. that would be useful to know.

Last edited by Algaris (2025-05-08 10:53:25)

Offline

#38 2025-05-08 11:12:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,351
GitHub

Re: Adventures in Linux Land

That’s pretty much the route I take with Percona MySQL from vendor repo, albeit a little less belt-and-braces. A few observations / considerations:

  • The Debian / Ubuntu packages are pretty resilient and battle-tested, and from memory (don’t quote me on this) the handful of in-place upgrades I’ve done from Percona MySQL 8.0 to 8.4 kept the configs intact.
  • Consider xtrabackup for enhanced backups: www.percona.com/mysql/software/percona-xtrabackup
  • If you’re getting into backups beyond box-ticking, consider PHPBU if you’re running PHP on your server. There’s no support for xtrabackup yet but mysqldump does the job just fine.

The Textpattern servers are running Percona MySQL and an in-place upgrade happened on two of the VPSes, short of a reboot when I bumped Ubuntu to 22.04 there was no downtime. The next iteration of Textpattern VPS won’t be using Ubuntu at all, but will use Percona MySQL. An upcoming demo server VPS will have multiple MySQL-like instances from 3x vendors, and that involves compiling from source…which takes a veeeery long time. Worth it, but not something that can be rushed.

Offline

#39 2025-05-08 11:15:41

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,351
GitHub

Re: Adventures in Linux Land

gaekwad wrote #339681:

The Textpattern servers are running Percona MySQL and an in-place upgrade happened on two of the VPSes, short of a reboot when I bumped Ubuntu to 22.04 there was no downtime.

gaekwad wrote #338037:

For me, I don’t do in-place upgrades.

I don’t typically do in-place upgrades. There was a rats nest and I had security concerns, so needs must.

Last edited by gaekwad (2025-05-08 11:16:16)

Offline

#40 2025-05-12 08:32:08

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 570

Re: Adventures in Linux Land

Thanks for your reply. You always give me plenty to think about and research. I’ll definitely dig into PHPBU and xtrabackup.

I’m not quite at the point that you are. It’ll take me way longer to keep creating new servers with every upgrade as opposed to doing in-place upgrades. This is the first time I’m replacing all my servers as I’m migrating from Ubuntu to Debian. It’s a great opportunity to clean things up and switch over to Caddy and Percona MySQL at the same time.

Offline

#41 Today 15:16:21

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,351
GitHub

Re: Adventures in Linux Land

Algaris wrote #339690:

I’ll definitely dig into PHPBU and xtrabackup.

Super high level: PHPBU is a wrapper for file and / or database backups. It’s intuitive to work with, the developer is a genuinely helpful guy (a breath of fresh air compared with another project where I was belittled in a support query after following their documentation), and it’s actively developed.

It’ll take me way longer to keep creating new servers with every upgrade as opposed to doing in-place upgrades.

Try not to stress over anything. When I was in my Ubuntu era, I would run the current LTS release (e.g. 18.04) and stick with it until the release of the next-but-one release (e.g. 22.04). This balanced the supported-ness of the whole thing (still well within acceptable support terms) with a level of reliability.

Then snap containers came along, I didn’t quite ‘get’ them, and vowed to stick with the least snap-y release until I had updated my build playbook for Debian. Night & day difference when I’d switched to Debian 12: no junk, no arbitrary container drivel and caches littered around the place, and barely any difference with the commands needed to build a server.

I have a handful of Debian / Ubuntu operating system checks (i.e. “if Debian do X, if Ubuntu do Y”), and they mostly check the correct library / dependency is used since there’s some disparity between Ubuntu and Debian package naming. The one thing that caught me out initially with one of the Debian releases was the introduction of bracketed-paste – but the first thing I do on a Debian build is turn it off:

if \
[[ $(awk -F= '$1=="ID" { print $2 ;}' /etc/os-release) = "debian" ]] \
; then \
bind 'set enable-bracketed-paste off' \
&& touch "$HOME"/.inputrc \
&& sed -i '/enable-bracketed-paste/d' "$HOME"/.inputrc \
&& echo 'set enable-bracketed-paste off' >> "$HOME"/.inputrc \
; fi

…and normal service resumes.

This is the first time I’m replacing all my servers as I’m migrating from Ubuntu to Debian. It’s a great opportunity to clean things up and switch over to Caddy and Percona MySQL at the same time.

I’m definitely interested to hear how you get on with Caddy. That’s on my list this year or next.

Last edited by gaekwad (Today 15:16:37)

Offline

#42 Today 19:24:19

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,906
Website GitHub

Re: Adventures in Linux Land

gaekwad wrote #339716:

I’m definitely interested to hear how you get on with Caddy. That’s on my list this year or next.

GitHub tells me you starred Ferron (website) recently. That seems quite young but growing at a rapid pace. Any opinions on that, e.g. compared to caddy? In their own reporting, they say it’s faster, but speed isn’t everything, I guess…


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB