So I raised a feature request recently to get the 'group' table renamed as that is actually a sqlite keyword.
For the general user this is completely invisible but becomes an issue for scripts such as pihole-cloudsync (which I use but do not author) as it requires a syntax change for exporting the group table (from the master pihole) and actually breaks importing the table (on the slave piholes).
The feature request didnt get very far and is largely out of scope for any pihole discussions as exporting and importing tables is not required for normal functions / 99.9% of your user base - I get that.
however...
In trying to fix the above issue I have just found various things.
- the table export can be made to work by enclosing the group name eg 'group'
- the .import function will not work with the table name group no matter what you enclose it in, '' "" `` etc.
- The only workaround I have for the above is to modify the drop / import process normally used by pihole-cloudsync to be a drop / import to temp / rename temp but only for the group table.
- Whether step 3 works or fails seems to also depend on the version of sqlite installed eg I have one system with 3.27.2 that fails as a slave but another system running 3.16.2 that works as a slave with identical code. And its only the group table causing problems.
- My only real solution for this is to manually copy the group name settings between piholes then use pihole-cloudsync for everything else - including all the other group membership details - so it's messy
Again this is hardly a pihole problem - but it could be.
There are various feature requests asking for syncing multiple piholes, possibly running a cluster, possibly syncing databases, possibly doing all sorts of things (that might or might not get implemented) and I feel that you are going to hit issues with coding that, and possibly supporting that especially if sqlite version becomes a factor on whether code works.
So what am I doing ? Well all this is a shout-out as I want the devs to be aware of it. I'm not expecting a fix, I'm not asking for a fix (though it would ne nice...). I just want to save you some time if you are going the route of exporting / importing tables between piholes because you will hit issues.
And this is all because the use of the table name 'group' is problematic