Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7742

Networking and servers • Re: PiHole

$
0
0
I've moved over to the rpi3 dns as of a few minutes ago. I'm going to leave it active for a few days to see if there are any major problems. I don't think there will be. Trying to automate the restore across two different boxes mostly works but ultimately is a manual process. There are little glitches. For instance, I called the rpi3 pihole "dns1" while I was setting it up. It is now called "dns" like the transient rpi4 pihole (and my original dns/dhcp server) but something(*) keeps adding "dns1" back into /etc/hosts. It's not affecting functionality.

The two key shellscript functions for backup are..

Code:

fcp_backup_ftl (){ FTL=`sudo pihole-FTL --teleporter` sudo chown `id -un`:`id -gn` "$FTL" || exit 1}fcp_backup_db (){ DBO=`f_tmpdir_top`"/""$DBN" sudo sqlite3 "$DBI" ".backup ""$DBO" || exit 1 sudo chown `id -un`:`id -gn` "$DBO" || exit 1}
..my script combines them into a single tarball with a timestamp. No point me posting the entire script because it requires other functionality off my github. However, I can now confirm those two operations from the command line will result in enough information to restore pihole. It could be automated if it were a restoration back onto the same pihole. Maybe I'll revisit in a couple of weeks.

(*) Network manager if I had to guess. I don't care atm as long as the rpi3 pihole works.

The logging thing is (will be) a failure point. I will be investigating @butchkemper's Log2Ram suggestion. I need the transient rpi4 pihole for that which I've simply turned off for now, lest I need to revert back in a hurry. This reminds me, I better go backup the entire rpi3 pihole - now in fact!

Statistics: Posted by swampdog — Wed Jun 03, 2026 8:42 pm



Viewing all articles
Browse latest Browse all 7742

Latest Images

Trending Articles



Latest Images