Restore pihole settings when sd card is broken

The sd card in my raspberry pi is broken. i can’t boot that card. i’ve reinstalled raspberry pi os and pihole and what to restore the old config. There is a backup i made from the complete sd card a few weeks ago. What files do it need to restore to have the same settings on my new install?

Some of the contents of the etc/pihole/ directory.

At least the ones indented below in the directory listing.

ls -lha /etc/pihole
total 48M
drwxrwxr-x   8 pihole pihole 4.0K Oct 29 17:54 .
drwxr-xr-x 139 root   root    12K Oct 29 10:11 ..
-rw-r-----   1 pihole pihole   65 Mar 26  2025 adlists.list
drwxr-xr-x   2 pihole pihole 4.0K Oct 29 10:17 config_backups
    -rw-r-----   1 pihole pihole  171 Mar 26  2025 dhcp.leases
    -rw-r-----   1 pihole pihole 6.2K Oct 10 20:42 dnsmasq.conf
-rw-r-----   1 pihole pihole   12 Mar 26  2025 ftlbranch
drwxr-xr-x   2 pihole pihole 4.0K Oct 29 10:17 gravity_backups
    -rw-rw-r--   1 pihole pihole 6.1M Oct 29 10:17 gravity.db
-rw-r-----   1 pihole pihole 6.1M Oct 27 06:05 gravity_old.db
drwxr-xr-x   2 pihole pihole 4.0K Mar 26  2025 hosts
-rw-r-----   1 pihole pihole  408 Oct 29 10:17 install.log
drwxr-xr-x   2 pihole pihole  16K Oct 26 04:03 listsCache
-rw-r-----   1 root   root    439 Mar 26  2025 logrotate
-rw-r-----   1 pihole pihole 3.3M Oct 29 10:17 macvendor.db
drwxr-xr-x   2 pihole pihole 4.0K Mar 26  2025 migration_backup
drwxr-xr-x   2 pihole pihole 4.0K Mar 26  2025 migration_backup_v6
    -rw-r-----   1 pihole pihole  29M Oct 29 10:17 pihole-FTL.db
-rw-r-----   1 pihole pihole  32K Oct 29 21:30 pihole-FTL.db-shm
-rw-r-----   1 pihole pihole 3.3M Oct 29 21:30 pihole-FTL.db-wal
    -rw-r--r--   1 pihole pihole  66K Oct 29 10:17 pihole.toml
-rw-------   1 pihole pihole  733 Mar 26  2025 tls_ca.crt
-rw-------   1 pihole pihole  713 Mar 26  2025 tls.crt
-rw-------   1 pihole pihole 1001 Mar 26  2025 tls.pem
-rw-r--r--   1 pihole pihole  359 Oct 29 17:54 versions

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