I posted before about the possibility of dist-upgrading from Buster and was advised against it. But I thought of another approach that could work. I have not had problems with non-pi-hole related dist-upgrades in the past so I was wondering if the following would be a viable strategy:
Back up the pi-hole configuration (pihole -a -t or use web interface).
Uninstall pi-hole (pihole uninstall).'
Incrementally update distribution: i) edit /etc/apt/sources.list substituting bullseye for buster, ii) dist-upgrade, iii) reboot, iv) edit again substituting bookworm for bullseye, v) dist-upgrade, vi) reboot.
Run pi-hole installation (curl -sSL https://install.pi-hole.net | bash).
Well, I did it. It took a little bit of work to get the dist-upgrade to work (some incompatible packages that had to be uninstalled) but once I got it up to bookworm, everything worked fine!
Yes, a fresh install would be easier in a way but it's such a pain to do an install without a monitor. And overall, it wasn't bad and I didn't have to do a headless install.