# Data Compare Command Line

Before Using the Command line, the user needs to go to the Data Compare and create a profile that can be used as a project/profile to interact with the Command line.&#x20;

Follow the following links to set up a Data compare profile.

[Source Setup](https://docs.mydbsync.com/cloud-replication-main/data-compare/starting-data-compare/source-setup)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddldtMcqgYn1xdXy8RJRQ5HANuwXIv3v-D_41ral58r9wzMbZbtI_R5R-sFCYeM70slHFUKkYNxbqy1lWuns-3zbS5AKAzYdNf6AbvcHN6HgkZlfPNzZ87IQ0uHzow9-tMYmVjdgi8HmFHNa3AwAVSAB7C?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption></figcaption></figure>

\
Once the profile is completed use the given Command lines to interact with Data compare Profiles

## CLI to Interact with Profiles

This command compares data (as configured) within the Profile named \<projectname> and applies various specified options to tailor the comparison process and its outputs.<br>

### **Commands for Getting the list of profiles present for comparison**&#x20;

This command will help to get the list of all profiles that are created for data compare&#x20;

```
// > dbsync-cli.bat dbs compare -list 
```

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXef5U-VvFDFlY8ZVtYcam15TC3X2KWJb1bvUsEkv0ck_S8yDUYss8ve_8F7Avo4dpsJR1oFTK6U9hhKM-pMRftnBqtvVJDOCnXBE2qNerc4Eoyg09J3He31MSfVnZ8yeZcEikjjVD-gjDoruEOwU38c23Fd?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption></figcaption></figure>

### Result&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcPnoptFuLt6Pi772VjjDhB50ejRRNZP_Hjt7oknPEMvpqGak9iviRPWNz6EvedqLvLUmYXr2m7szh1U4ztX-CH5938bHLZLrWSSj0n9y1f9cHqxx78wcbObayg-T2d9YW0EOhFC1KwGGoxTslQQ36gsmXL?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption><p>Showing the List of profile that is present </p></figcaption></figure>

Terms defined in Command and their meanings &#x20;

* **‘-project=\<projectname>**’: Specifies the profile containing the database configurations to be compared.
* **‘-download=\<true|false>**’: Controls whether to download the comparison reports as files. If **‘true,’** reports selected in the ‘-show’ option will save to the specified output directory; otherwise, a summary is displayed.
* **‘-show=\<Filters>**’: Comma-separated filter name(s) determines what to show in the output. Options include ‘all\[default]’, ‘onlyInTarget’, ‘onlyInSource’, and ‘different’.
* **‘-list’:** Displays a list of existing projects configured for comparison.

## **The command for comparing the projects**&#x20;

This command will help to get the “compare” result of the selected profile, which you get in the above step&#x20;

{% code fullWidth="false" %}

```
// >dbsync-cli.bat dbs compare -project=<project name > -download=<false/true> -show=<"OnlyInTarget, OnlyInSource, all"> 
```

{% endcode %}

> Depending on the Use one can define the properties for Download - If **‘true,’** reports selected in the ‘-show’ option will save to the specified output directory; otherwise, a summary is displayed.
>
> For Show one can select all three option or even one or two depending on what report they want to see either they want to know "onlysource" count "onlydestination" count or "all" counts&#x20;

### &#x20;**The command for comparing the projects with download = false**

dbsync-cli.bat dbs compare -project=\<project name> -download=false -show="OnlyInTarget, OnlyInSource, all"

```
// dbsync-cli.bat dbs compare -project=<project name> -download=false -show="OnlyInTarget, OnlyInSource, all"
```

Example&#x20;

```
//>dbsync-cli.bat dbs compare -project=SFtoMySQL -download=false -show="OnlyInTarget, OnlyInSource, all"
```

{% hint style="info" %}
Note- As Download is false, this command will only show the results, but the result files will not be downloaded&#x20;
{% endhint %}

While processing, it will show the job run's status, date, and completion time.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcG31dHgr-cjlTNc2RLAdL7PAst7g31EY2kEuh3680yyF-JfNk_9L9j4IKktSuUsEjacNv9VrFcF9grmVd4-M-_lO3ZieR0X7VCojd6QNI6XfVttg-mS5Lxrd50eUrbMjd7ElBrix8ZNnI3ywOuMuKTWEcY?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption></figcaption></figure>

### Results of comparison

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXehVCEdeFnjx7dAihnad-BQs_Bme6dq_AgDCTEfwkTkP14BLphjURaf63lAG6k4zwZiwNfnviFgw1sj3Fto-9yQM88cMz3kRGGkhW9pmnF_hzM8pI6I9_LBK8U2Y398ggnnu7xUVbzWFAQZ1xu7aGV2tPIr?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption><p>Result Shows list of all three </p></figcaption></figure>

### **The command for comparing the projects with downloading into a temp folder**

dbsync-cli.bat dbs compare -project=\<project name> -download=true -show="OnlyInTarget, OnlyInSource, all"

```
// dbsync-cli.bat dbs compare -project=<project name> -download=true -show="OnlyInTarget, OnlyInSource, all"
```

{% hint style="info" %}
Note- As Download is true, this command will only show the results, and also the result files will be downloaded
{% endhint %}

**Example**&#x20;

```
// dbsync-cli.bat dbs compare -project=SFtoMySQL -download=true -show="OnlyInTarget, OnlyInSource, all"
```

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfkktcuJUtZlXVoLugfIvWfEqaXZZOCSUyofZ2JHUuDJhSRJDfnAUZ1k8LYwdVJ3j01DMjjuUCIRtWKtLPzBmcLhT-jJMQ0bvcG0erEnJOWPPOO-n5XazRH7SKTOk0lDYIcI8n6VFw7t-LjcA0N1FcmwvFj?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption></figcaption></figure>

#### Results of comparison

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeDSaRXfecgdURRbswduSBme3VhPvBGjugMPfpy3HCy1T53t2m01FTDzE1a2PDbTZo42AX9bfxnH4pGFcimHNFxYzHsN-DOqJr3Sakr2kYz_kiFNWKWWQCAc4zGk_kHZdyqomwd0k_nRrgVZtgv6z__FT2B?key=fKy4lBY88y-FCOatryNqmg" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-replication-main/data-compare/data-compare-command-line.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
