Giter VIP home page Giter VIP logo

Comments (4)

PromoFaux avatar PromoFaux commented on June 13, 2024

I think the assumption here is that you will already have run gravity on your primary Pi-hole instance after adding new lists, no need to automate this.

Thinking out loud, and maybe this would be a seperate issue @mattwebbio, however I wonder if it might not be better to have an option to only run gravity on the remote if it is detected that a list was added or removed. I've not yet dug into the internals of this project, so it might be more complex than meets the eye.

My thinking is: Pi-hole already runs gravity on a schedule once a week, which to be honest is more than enough. The only time that gravity should need to be run manually is after a change to the lists being used on the instance - or it a list maintainer resolves an issue with their list. Other than that, list contents don't change all that often - so running gravity every INTERVAL_MINUTES may just be overkill :)

from orbital-sync.

mattwebbio avatar mattwebbio commented on June 13, 2024

@PromoFaux

if it might not be better to have an option to only run gravity on the remote if it is detected that a list was added or removed

Taking this a step further, I would love to only perform a sync when changes are detected on the primary (as opposed to blindly uploading backups to the secondaries at the interval).

Right now, Orbital doesn't know anything about the state of the PiHoles it's syncing or the contents of the backups. If that problem were solved (though I'm not sure what the best approach to this would be), it would be much easier to control "when" things happen. I don't have much time to investigate this unfortunately, but ideas and PRs are definitely welcome 🙂

from orbital-sync.

PromoFaux avatar PromoFaux commented on June 13, 2024

Only things I can think of off the top of my head right now:

  • Take a teleporter backup from both the primary and secondary, extract them, and then compare the file contents.
  • Keep the previous teleporter backup from the primary in memory/file somewhere, and use that to compare against the newer backup - if there are no changes - no need to restore to secondary. If there are changes, is it just black/whitelist items? If so, just sync and do nothing. If there are adlist changes, then sync and also do gravity run.

In an ideal world, we would get off our arses and design some sort of HA functionality into Pi-hole directly - but it's finding the time! Never say never, though.

from orbital-sync.

JvdMaat avatar JvdMaat commented on June 13, 2024

Yeah, please do not do a gravity update on the primary. I have two piholes. Primary is in docker, the backup is on a Pi Zero W. (low power, cause it's just backup DNS and serves only about 25% of all queries). But the gravity update kills the Zero W, and the orbital sync was failing (timeout on gravity update). So I switched the orbital sync config around so the Pi Zero W is the "primary", and syncs changes to the docker container without issues.
Doesn't pihole automatically do a regular gravity update? As PromoFaux said, if you update the adlist, you should do your own manual gravity update.

And also seconding the only do a gravity update if there was a change. But that would require retaining the backup, unzipping it, inspecting it, etc. So that's quite a bit of work.

And extrapolating on that, if you keep backups of both primary and secondary (and tertiary, etc), you can theoretically make a change on any of the piholes, and it will sync out to the others. No need for primary or secondary. They're all equal.

from orbital-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.