Skip to content

Bash script to push Pi-hole configuration files to a secondary Pi-hole server for redundancy

Notifications You must be signed in to change notification settings

bayko/pi-hole-server-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

pi-hole-server-sync

Bash script that pushes all Pi-hole blacklist and whitelist settings to a secondary server for redundancy

Script assumes 2 servers exist: SERVER1 (containing current configuration) & SERVER2 (secondary server) which have ability to communicate directly over the network. Default port for SSH on SERVER2 is also assumed.

Passwordless SSH login is required between SERVER1 & SERVER2 for the script to work:

  • From SERVER1 run: ssh-keygen -t rsa
  • From SERVER1 run: ssh-copy-id user@SERVER2
  • To test from SERVER1 run: ssh user@SERVER2

Ideally script should be scheduled as cron job to perform syncronization at regular intervals

Script must be executed as sudo on SERVER1

sudo ./pi-hole-push-config.sh

About

Bash script to push Pi-hole configuration files to a secondary Pi-hole server for redundancy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages