I think this is it:
THIS IS COMPLETELY EXPIERIMENTAL, NO WARRANTY:
Stop FTL.
sudo systemctl stop pihole-FTL
Copy the existing pihole-FTL.db
for backup.
sudo cp /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL.db.orig
See if we can use FTL
's recovery:
sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db .recover | sudo sqlite3 /etc/pihole/pihole-FTL.db.recovered
If that completes then move the recovered database to be used
sudo mv /etc/pihole/pihole-FTL.db.recovered /etc/pihole/pihole-FTL.db
Restart FTL
sudo systemctl start pihole-FTL