3.7.0
The Daemon Release
This release features a different method of managing automated replication. Crontab has been deprecated in favor of scheduled tasks using systemd timers. To switch to the new replication method, just run ./gravity-sync.sh auto
again, and it will remove existing crontab settings in favor of systemd.
Using systemd allows more options in timing replication jobs, but this especially useful for viewing the logs of previous automation jobs via standard journalctl -u gravity-sync
commands. Where as previously automation jobs would run at 5, 10, 15 or 30 minute intervals within an hour, new automation tasks within systemd are configured by default to run every 5-10 minutes after being started. (This is 5 minutes + a random timer < 5 minutes.) Replications will automatically attempt for the first time 2 minutes after the system is powered on. This bit of randomization should allow users with multiple secondary Pi-hole syncing from a single primary, the ability to stagger load on the primary.
- Users wishing to adjust the timing should review the
/etc/systemd/system/gravity-sync.timer
file and adjust the values forOnBootSec
,OnUnitInactive
, andRandomizedDelaySec
accordingly. There is no method within the Gravity Sync interface to adjust these, at present. - Edits made to your
templates/gravity-sync.timer
file are not be persistent after updating Gravity Sync, but the timers applied to your individual system in/etc/systemd/system/gravity-sync.timer
will not change unless you run./gravity-sync auto
again after updating. - Leveraging system allows more options in timing replication jobs, but this especially useful for viewing the logs of previous automation jobs via
journalctl -u gravity-sync
More how-to on the advanced uses ofjournalctl
can be found here.
Previously, running ./gravity-sync.sh auto
and setting the value to 0 would disable the cronjob. Running it again would then prompt for a new value. Now the AUTOMATE
function will only reapply the latest automation job settings. If you would like to temporarily pause automated replication, you can use systemctl stop gravity-sync.timer
and then systemctl start gravity-sync.timer
to begin again.
- If you would like to completely disable automated replication, you can use
systemctl disable gravity-sync
for this task. Running./gravity-sync.sh auto
again will enable and start replication again. - If you would like to continue using or managing automation through crontab, these functions have been moved to
./gravity-sync.sh cron
which was previously used to display the output of the previous cronjob. - Users can now just manually
cat logs/gravity-sync.cron
to view the output of the previous cronjob.