add the ability to call transporter from a cron job to export settings to a SMB share on local network
This is out of scope for a DNS/DHCP server. This can be accomplished with a custom user-made script.
out of scope to backup importaint setting automaticly?
if this can be done as it is currently setup, care to explain?
coming from someone that had a pihole crash and had to start from scratch, this is a nice feature to have!
We already export the settings, it is up to the user to decide what to do with them. Exporting to an SMB share on a local network is a super specific thing, which is one of the reasons it is out of scope.
Right now we're busy working on a new API which will make these kinds of things easier. With that new API, it should be easy for you to automate it. If we add it, then that is yet another thing we have to spend our limited time supporting. We would rather spend that time developing the project and helping users with issues.
The teleporter function exports:
the contents of /etc/dnsmasq.d/
/etc/pihole/setupVars.conf
/etc/pihole/adlists.list
/etc/pihole/whitelist.txt
/etc/pihole/blacklist.txt
/etc/pihole/wildcardblocking.txt
You can automate a crontab to cp these files to any destination ...
correct, my question was how?
you can either create an executable script that holds all the commands:
cp /etc/pihole/setupVars.conf /YOUR/SMB/FOLDER/
and so forth
(syntax is cp source destination
)
You need to chmod the file to make it executable so that it runs when invoked by crontab
chmod +x nameOFfileYouJustCreated
then plug it in crontab by running crontab -e
.
Use https://crontab.guru/ to get your crontab time format.
Or, you can plug all the cp commands one by one in crontab
thank you!
You can run pihole -a teleporter
to have the export zip placed in the current directory.