Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Automation

Michael Stanclift edited this page Apr 13, 2022 · 2 revisions

Automation of sync is accomplished by adding an execution of the script to each host's systemd configuration.

gravity-sync auto

Automation tasks within systemd are configured by default to run at semi-randomized times on each node. The net effect is replication should happen in under 5 minutes.

(Replications will also automatically attempt for the first time 2 minutes after either system is rebooted/powered on.)

Now, make another small adjustment to your primary settings and wait until anointed time to see if your changes have been synchronized. If so, profit! If not, start from the beginning. From this point forward any block list changes you make to either instance will quickly be reflected on the peer.

Speed Settings

If you would like to adjust the frequency of automation, you can do so by passing a speed option to the automation function.

  • gravity-sync auto hour for hourly intervals.
  • gravity-sync auto half for half-hour intervals.
  • gravity-sync auto quad for quarter-hour intervals.

There is still an element of randomization in each setting to prevent overlap. You can use different frequency options on each Gravity Sync peer if desired.

Log Redirection

By default, Gravity Sync automated job logs are written to the system's syslog. If you would like to redirect this to a different location edit your gravity-sync.conf file and add the line GS_SYSLOG_REDIRECT='/full/path/to/log.file with the location you'd like to use instead. If you have already enabled automation, after editing your .conf file, you will need to run the auto command again for the log redirection to be implemented.

Clone this wiki locally