How correctly sync files in HA

Hello.
I use a HA cluster and add some init.sh script or a script for VM_HOOK.
When i add init.sh script, it only added in file datastore on leader.
The script for VM_HOOK i add in a directory /var/lib/one/remotes/hooks/ on the leader.
How auto sync this files among all servers in the cluster?

Hi @perrfect,

There are some differences between the two example you mentioned. Let me address them separately:

When i add init.sh script, it only added in file datastore on leader.

When deploying an HA cluster, the easiest way to have Image and File Datastores synced across every HA node is to deploy some kind of shared storage and have it available on every node (e.g NFS).

The script for VM_HOOK i add in a directory /var/lib/one/remotes/hooks/ on the leader.

After changing any configuration file or script under /var/lib/one/remotes in the frontend node, you can replicate the changes to the nodes by using onehost sync command. You can find more info directly running onehost sync --help or checking the docs here.