stevejenkins / pihole-cloudsync

Syncs blocklists, blacklists, and whitelists across multiple Pi-holes using a private GitHub repo
MIT License
515 stars 105 forks source link

Push Does Not Include - gravity.db and custom.list #14

Closed JeffHochberg closed 3 years ago

JeffHochberg commented 4 years ago

I only have a single Pihole server at this point in time. I am using the custom.list file to store DNS records for systems on my internal network.

I went through the installation routine as documented:

  1. Forked the repo
  2. Marked as private
  3. Cloned pihole-cloudsync to /usr/local/bin
  4. Cloned my repo to /usr/local/bin (full path is now /usr/local/bin/my-pihole-lists)
  5. Ran sudo pihole-cloudsync --initpush
  6. Ran sudo pihole-cloudsync --push

When I go and look at the status of my repo, the following files were updated within the past few minutes:

The following are marked as updated "Last month" (i.e. not synced):

Shared hosts is not enabled at this time, so I don't expect to see sharedhosts.txt updated at all.

Why would pihole-cloudsync not pick up changes in my custom.list and gravity.db?

bondskin commented 4 years ago

Hi @cyberjew , how did you made it private? I get the message "Make this repository private Public forks can’t be made private. "

Also when I push, I don't find my files on the GitHub but only the original ones from the Master Branch

JeffHochberg commented 4 years ago

@bondskin apologies for the delay in getting back to you.

I found an article on stackoverflow.com that covered how to do it:

https://stackoverflow.com/questions/10065526/github-how-to-make-a-fork-of-public-repository-private/30352360#30352360

I started out by forking the repo as specified in the pihole-cloudsync instructions. Then I cloned the forked repository into a new repository that I created.

Basically I called the forked repository 'pihole-cloudsync-forked'.

Then I created a new repository called 'pihole-cloudsync' as I wanted to ensure my private repository had the exact same name as Steve's, and I simply marked it as private.

After I did that, I followed the rest of the step-by-step that Steve provided for pihole-cloudsync. Aside from not backing up gravity.db and custom.list, the rest of the backup worked as designed.

Please let me know if this works for you as well.

I hope Steve reviews this and provides a response soon.

plittlefield commented 3 years ago

Also, a MAJOR factor is this working is the version number :-)

Mine would not work either until I saw the pihole-cloudsync script had hardcoded version 4 and I am on version 5 !

So, just edit the pihole-cloudsync file and change this line...

pihole_version=5

...then run the --initpush again and it will work.

Hope this helps.

bondskin commented 3 years ago

Hi @JeffHochberg, did you manage to fix the missing gravity.db issue? I face the same here (version is set to 5)

edegroot-nl commented 3 years ago

Why would you upload gravity.db? The intention of this script is to export a csv file and import it back on your second pihole. with pihole -g it will download the lists. Github has a filelimit of 100mb. gravity.db can be very large.

ls -alh /data/pihole/gravity.db -rw-rw-r-- 1 pihole pihole 83M Jan 3 03:09 /data/pihole/gravity.db This is only 1.3 milion blocked domains, with logging enabled it can be larger. If you copy gravity.db it will contain logging of your first pihole and your second pihole will have inconsistent logging.

bondskin commented 3 years ago

Why would you upload gravity.db? The intention of this script is to export a csv file and import it back on your second pihole. with pihole -g it will download the lists. Github has a filelimit of 100mb. gravity.db can be very large.

ls -alh /data/pihole/gravity.db -rw-rw-r-- 1 pihole pihole 83M Jan 3 03:09 /data/pihole/gravity.db This is only 1.3 milion blocked domains, with logging enabled it can be larger. If you copy gravity.db it will contain logging of your first pihole and your second pihole will have inconsistent logging.

thanks, that does make sense now

JeffHochberg commented 3 years ago

I ended up having to rebuild my Pihole server (failed SD card). I just ran through the entire setup process using the most current version of pihole-cloudsync and everything seems to be working nicely. I was even able to automate the process with systemd. I'm going to mark this as resolved.