How to break Pi-hole during migration to a new system

Please follow the below template, it will help us to help you!

Expected Behaviour:

Admin should be able to migrate Pi-hole to another system and have it work.

Actual Behaviour:

Admin is a bit clueless. Pi-hole fails to work on the new system, until admin has a lightbulb moment.

This morning I spun up a new Raspberry Pi with the latest Raspbian Buster Lite from 26th September 2019, and installed Pi-hole on it. I copied across my existing custom dnsmasq configuration (/etc/dnsmasq.d/02-custom.conf) and custom hosts file which is referenced by that same 02-custom.conf file.

Pi-hole wouldn’t start DNS, and the admin web page kept showing “Lost connection to API” and “DNS service not running”, no matter how many times I tried to restart the FTL service or even reboot the Pi.

Eventually, a mental lightbulb illuminated and I looked in /var/log/pihole.log which revealed the answer: dnsmasq was refusing to load because a specific directory was missing.

I had been using dnsmasq to serve TFTP from the previous Pi. /etc/dnsmasq.d/02-custom.conf had an entry for /etc/tftp but I hadn’t created the directory /etc/tftp on the new Pi. That’s what was causing dnsmasq to fail.

Once I recreated /etc/tftp then pihole-FTL loaded successfully and DNS started working again.

If anyone else has similar issues after migration and was using a customised dnsmasq configuration before migration, check that all of the files and directories referenced by that custom configuration still exist.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.