Git Product home page Git Product logo

pihole-rsync's People

Contributors

jejje avatar miarn avatar thomaschung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pihole-rsync's Issues

Permission denied

Hi, this is interesting and seems quite simple - thank you for sharing.

When I set this up unfortunately I get a permissions denied error when I run this - any ideas on what am I doing wrong?

Here is what I get when manually running this from the 'master pihole' to the secondary one.

pi@pi-server2:/etc/pihole $ sudo ./pi_rsync.sh -s
Syncing {gravity.db} over to {192.168.10.66}...
rsync: mkstemp "/etc/pihole/.gravity.db.UBI39Q" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Syncing {custom.list} over to {192.168.10.66}...
rsync: mkstemp "/etc/pihole/.custom.list.qWKIPL" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Syncing {dhcp.leases} over to {192.168.10.66}...
rsync: mkstemp "/etc/pihole/.dhcp.leases.bn9i35" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Syncing {local.list} over to {192.168.10.66}...
rsync: mkstemp "/etc/pihole/.local.list.vwgcSi" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
Running command pihole -g on {192.168.10.66}

Thanks.

Do we really need the pihole -g ?

I was wondering if we really needed the pihole -g command?
As we rsync the whole DB, I think that a simple stop / restart / reload list would be enough, or am I wrong?

Other than that, your script is simple and do all I need. Thanks for that :-)

Typo in CRONTAB

Oh, and the crontab you create within the script indicates /etc/pi_rsynch.sh ; I edited it as it should be /etc/pihole/pi_rsynch.sh

:-)

Originally posted by @Damien514 in #2 (comment)

syncing dhcp leases

I guess this is a feature request.
I would like to also sync my dhcp static leases.
I did solve this for me but not cleanly as my script writing skills are non existant.

I copied the script to /etc/dnsmasq.d/pi_rsycdhcp.sh

Then I edited it to sync 04-pihole-static-dhcp.conf (your name may be different)
and changed any directory /etc/pihole/ to /etc/dnsmasq.d/

Ran it and it worked.

It would be great if this could all be one script.

Awesome script way easier than setting up containers to run a separate program.

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.