> For the complete documentation index, see [llms.txt](https://docs.mydbsync.com/cloud-workflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/replicate.md).

# Replicate

The DBSync Replicate action replicates data on a schedule from cloud applications such as Salesforce into relational databases such as PostgreSQL, Redshift, or SQL Server. Use it to maintain backups, support reporting, and meet data archival and compliance requirements.

## Add and configure the Replicate action

After creating your project, DBSync redirects you to the **Automation** tab.

{% stepper %}
{% step %}
In the action picker, locate **Context Builder** under the **AI** section. Drag it into your flow at the point where you want to compose the text.
{% endstep %}

{% step %}
Click **Configure**.
{% endstep %}

{% step %}
In the **Configure your Replication Action** section, click **Configure**. <br>
{% endstep %}
{% endstepper %}

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FPtgc2ayxMjblqRmWELr1%2Fimage.png?alt=media&amp;token=1bdbc606-be9a-43f8-a3b5-ce46ca9ca078" alt=""><figcaption></figcaption></figure></div>

### Configure the source application <a href="#step3configurethesourceapplication" id="step3configurethesourceapplication"></a>

{% stepper %}
{% step %}
In the **Source App** section, click **Select App**.
{% endstep %}

{% step %}
Click **Test Connection** to verify that DBSync can reach your source. A confirmation dialog indicates whether the connection succeeded. If the test succeeds, click **Save**.
{% endstep %}

{% step %}
Click **Next** to proceed to the target configuration.
{% endstep %}
{% endstepper %}

### Configure the database details <a href="#step4configurethetargetapplication" id="step4configurethetargetapplication"></a>

<div data-with-frame="true"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXflprEUKO4b4tjPYicOdwgNuNQ2oCdoKecueIQhwfNaP4cZ6LeBm6upve1XAGznRBvov9JR-CE8it99bjvWYDIOKZUZyzwi4nZ6xJN0OPCZHj0RxTUsAg25gTq3BWHG5yeFRpcS?key=ZgqvWB7K5_R-bU46Nkxjbw" alt=""><figcaption></figcaption></figure></div>

{% stepper %}
{% step %}
In the **Database Details** section, open the dropdown to see databases you've connected in Cloud Workflow.
{% endstep %}

{% step %}
If your target database isn't listed, click **+ Add New** and select the database type you want to configure.\
For more information about connecting a new database, see [Target database setup](https://docs.mydbsync.com/cloud-replication-main/target-setup).
{% endstep %}

{% step %}
Target advanced settings control how DBSync writes data to your destination. The available options include:

* File download
* Prefix settings
* Auto rename
* Database logging

For detailed configuration steps, see [Advanced settings configuration](https://docs.mydbsync.com/cloud-replication-main/target-setup/advance-settings).
{% endstep %}

{% step %}
Click **Next**.
{% endstep %}
{% endstepper %}

### Configure objects and fields <a href="#step5configureobjectsandfields" id="step5configureobjectsandfields"></a>

Objects correspond to tables in your source application. Fields correspond to the columns within those tables.

{% stepper %}
{% step %}
In the left panel, review the list of objects available from your source (for example, Account, Contact, or Opportunity).
{% endstep %}

{% step %}
Check the checkbox next to each object you want to replicate.
{% endstep %}

{% step %}
After selecting an object, its available fields appear in the center panel. Select the fields you want to copy, and move any fields you want to exclude to the **Excluded Fields** section.
{% endstep %}
{% endstepper %}

### Add data masking (optional) <a href="#step6adddatamaskingoptional" id="step6adddatamaskingoptional"></a>

Data masking hides or scrambles sensitive field values such as phone numbers or names during replication.

{% stepper %}
{% step %}
Click **Add Data Mask**.
{% endstep %}

{% step %}
In the popup, click **Data Masking**.
{% endstep %}

{% step %}
Select the object that you want to mask.
{% endstep %}

{% step %}
Select the field, turn masking **on**, and choose a masking type from the dropdown.
{% endstep %}
{% endstepper %}

### Run the replication job <a href="#step7runthereplicationjob" id="step7runthereplicationjob"></a>

{% stepper %}
{% step %}
Click **Run** at the top of the page.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FVgJX4FT4tot7pbJveB8F%2Fimage.png?alt=media&amp;token=250cc3b2-5c78-47f5-9e1c-9b86ba742819" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
From the dropdown, select the command you want to execute.

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FIkItJBVkg547mVsVcVTG%2Fimage.png?alt=media&amp;token=46cae237-3d9d-4734-a2d3-44d6fcf630d5" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Click the **Play** button next to the command.
{% endstep %}
{% endstepper %}

<div data-with-frame="true"><figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FXhAxf9rimmPLD6Dvo2eh%2Fimage.png?alt=media&amp;token=6ce1523a-5f1b-40d0-8fd4-b1852a9c961b" alt=""><figcaption></figcaption></figure></div>

DBSync starts the replication task and displays a confirmation message. Click **OK** to go to the Logs page, where you can monitor data movement in real time.
