Sync of configuration items between Pi-Holes

Given that gravity Sync has been retired as a GitHub project and that it no longer works with FTL v6.x it would be great to see sync functionality across the following features:

  • Configuration
  • DHCP Leases
  • Groups
  • Lists*
  • Domains/Regexes
  • Clients

I know you can move settings from one Pi-Hole to another via Teleporter but its a pain to keep having to do it or double keying in between two instances when running primary and secondary instances.

To be able to do this via the WebUI would be very useful.

Under Settings Menu there could be a new option "Sync" with some basic settings:

  • ON/OFF - Enable/disable feature
  • MODE - Set as Source (server holding settings to be pushed out) or Destination (server expecting to receive settings)
    • Destination setting also toggles on "webserver.api.app_sudo" to allow api to write above settings
    • Source setting also allows for choosing which of the above six settings are to be synchronised
  • DESTINATIONS - Available if MODE is set to Source to allow input of one or more rows of Destinations servers with columns as below:
    • IP address of destination server (xxx.xxx.xxx.xxx)
    • API authentication details (application password)
    • Status - Enabled/Disabled (same style as Lists page)
    • Comment - free text to allow name of server instance to be added
    • Trash - for removing entry
    • Sync Status - Same iconography as Lists page with mouse over tool tip
  • SOURCES - Available if MODE is set to Destination to allow input of the Source instance from which settings are to be received:
    • IP address of Source server (xxx.xxx.xxx.xxx)
  • SYNC INTERVAL - Time between attempted syncs (default behavior would be sync on save or update process completes from the 6 settings above, but you could have this as a fixed or defined time interval)

As with other processes logging pipped to Pi-hole diagnosis.

*Also consider if Lists on the destination server is populated by only a single entry, that of the Source server, and gets all of its Gravity entries from the source, instead of maintaining a local source list and running Gravity updates. Maybe this could be a configuration choice when enabling the feature.

I would think this is exactly what the APIs are for and would allow someone to craft their own, bespoke workflow. For example, I use an API call to get the current DHCP configuration so that I can craft an ethers file for my router and access point. Just a little bash/zsh, curl'ing and jq.

I don't disagree that the API's can do everything listed but the whole reason Gravity Sync gained popularity was it plugged a hole in functionality. It was simple enough to setup but probably technically a bit out of reach of many. Adding the features to the UI would just make life easier for many users.

While never having used it personally, nebula-sync is a popular tool to sync the configuration of two or more Pi-hole instances.