> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ConfigSync

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[old doc.lw link]: https//doc.lucidworks.com/fusion/5.9/j47yes

[localhost link]: http://localhost:3000/docs/5/fusion/operations/config-sync/overview

[mintlify link]: https://doc.lucidworks.com/docs/5/fusion/operations/config-sync/overview

ConfigSync keeps your Fusion configuration settings consistent and up-to-date across different environments by automatically synchronizing configuration data between your GitHub repository and your Fusion cluster.
It follows [GitOps](https://github.blog/enterprise-software/devops/applying-gitops-principles-to-your-operations/) principles by using GitHub as the single source of truth for configuration management.

<Note>
  ConfigSync requires using GitHub. Other Git providers are not supported.
</Note>

<Warning>
  ConfigSync supports TLS in Fusion 5.9.16 and later. For earlier versions, TLS must be disabled.
</Warning>

<LwTemplate />

## Features

ConfigSync supports these features:

* Configuration storage:

  ConfigSync stores and synchronizes the objects that make up your Fusion configuration.
  See [Supported Objects](/docs/5/fusion/operations/config-sync/objects/overview) for the complete list, with details about how each object type is handled.

  It works like this:

  * GitHub Repository: Stores the configuration files.
  * Fusion Cluster: Applies the configuration files to the Fusion cluster.
  * Kubernetes Secret: Stores the Fusion secrets.

* Synchronization mechanisms

  * Polling:

    * Periodically pulls the latest changes from the GitHub repository and applies them to the Fusion cluster.
    * Periodically pulls the latest changes from some solr collections (blobs, rules) and pushes them to the GitHub repository.
  * Event-driven:

    * Listens for changes in the Fusion cluster and pushes them to the GitHub repository.
    * Listens for changes in the Kubernetes secret and syncs them with the Fusion cluster.

* Synchronization modes

  * [Publisher mode](/docs/5/fusion/operations/config-sync/modes/publisher-mode): Monitors Fusion for changes and pushes them to a GitHub repository.
  * [Subscriber mode](/docs/5/fusion/operations/config-sync/modes/subscriber-mode): Polls a GitHub repository for changes and applies them to Fusion.
  * [Pub/Sub mode](/docs/5/fusion/operations/config-sync/modes/pubsub-mode): Combines the features of both Publisher and Subscriber modes.

* [Secret management](/docs/5/fusion/operations/config-sync/secrets-management)

  * Supports storing Fusion secrets in a Kubernetes secret and syncing them with the GitHub repository.
  * Watches for changes in the Kubernetes secret and syncs them with the Fusion cluster.

* [Version control](/docs/5/fusion/operations/config-sync/commits-management)

  * Maintains the `latest-synced-commit` to track the last applied commit.
  * Supports locking the configuration to a specific commit using `locked-commit`.

* Restoring configuration

  * Allows rollback to a previous state.
  * Supports restoring the configurations to a specific commit, branch or date.

* Metrics

  * Exposes metrics such as `resource_update_errors_total`, `out_of_sync`, `sync_seconds`, and `sync_seconds_max` at the `/actuator/prometheus `endpoint.

## ConfigSync versus Cross Data Center (CrossDC) replication

Fusion supports [Cross-Data Center Replication (CrossDC)](/docs/5/fusion/operations/solr-crossdc) in addition to ConfigSync.\
While ConfigSync is designed for configuration synchronization, CrossDC is designed for data replication.

Here's a comparison of the two features:

| Feature                         |                    CrossDC                    |                          ConfigSync                          |
| ------------------------------- | :-------------------------------------------: | :----------------------------------------------------------: |
| Collections data replication    | <Icon icon="check" size={24} color="green" /> |            <Icon icon="x" size={24} color="red" />           |
| Solr collection synchronization | <Icon icon="check" size={24} color="green" /> |            <Icon icon="x" size={24} color="red" />           |
| Rules synchronization           | <Icon icon="check" size={24} color="green" /> |         <Icon icon="check" size={24} color="green" />        |
| Configuration synchronization   |    <Icon icon="x" size={24} color="red" />    |         <Icon icon="check" size={24} color="green" />        |
| Blob synchronization            |    <Icon icon="x" size={24} color="red" />    |         <Icon icon="check" size={24} color="green" />        |
| Version control (GitHub)        |    <Icon icon="x" size={24} color="red" />    |         <Icon icon="check" size={24} color="green" />        |
| ZooKeeper data                  |    <Icon icon="x" size={24} color="red" />    |         <Icon icon="check" size={24} color="green" />        |
| Disaster recovery               |                For search data                |                    For configuration only                    |
| Latency reduction               |          Across geo-distributed users         |                        Not applicable                        |
| Typical use case                |    Global failover, data center redundancy    | DevOps config promotion, disaster recovery for Fusion config |

<Note>When you use CrossDC, ConfigSync must also be enabled in order to mirror Solr configset data that is directly modified in ZooKeeper by Fusion instead of by the Solr ConfigSet API.</Note>

See [Cross Data Center Replication](/docs/5/fusion/operations/solr-crossdc) for more details.

## Setup

See [ConfigSync deployment](/docs/5/fusion/operations/config-sync/deployment) to set up ConfigSync on your Fusion cluster.

<Card title="ConfigSync" class="note-image" href="https://academy.lucidworks.com/configsync-course" cta="Take this course on the LucidAcademy." icon="graduation-cap" iconType="duotone">
  The course for **ConfigSync** focuses on how to synchronize your Fusion configuration with a GitHub repository.
</Card>

## ConfigSync and S3BackupRepository

If you are using the S3BackupRepository plugin for Solr, note that changes from a restoration using the plugin are not pushed through ConfigSync, because backups and restores on the primary cluster using S3BackupRepository do not run through the update handler.
Backup and restore is an independent process.
You must backup and restore in both locations.
