# Correct syntax of compare command?

**URL:** <https://forum.duplicati.com/t/correct-syntax-of-compare-command/597>\
**Category:** Support\
**Created:** [September 12, 2017, 6:14pm UTC](https://forum.duplicati.com/t/correct-syntax-of-compare-command/597 "2017-09-12T18:14:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan\_bar](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jan\_bar](https://forum.duplicati.com/u/jan_bar)\
**Post date:** [September 12, 2017, 6:14pm UTC](https://forum.duplicati.com/t/correct-syntax-of-compare-command/597/1 "2017-09-12T18:14:37Z")

</div>

Hi,

thank you for Duplicati, I used it instead of CrashPlan. It’s not clear to me what is correct syntax of compare command, it seems that it doesn’t do what I want:

```
Duplicati.CommandLine.exe compare 0 2 --dbpath=C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\VHKSZYUOFM.sqlite --verbose

```

Outputs

```
Input command: compare
Input arguments: 
	0
	2

Input options: 
dbpath: C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\VHKSZYUOFM.sqlite
verbose: 

Listing changes
  1: 12.9.2017 19:19:04
  2: 10.9.2017 15:24:20

```

I want to compare versions 0 and 2 but it lists versions 1 and 2. What is wrong? When I specify destination URL instead of dbpath, it prompts for passphrase and insist it cannot be empty. My backup destination (USB drive) is without encryption.

Kind regards, Jan

---

<div class="post-metadata">

**Author:** ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)\
**Post date:** [September 12, 2017, 9:16pm UTC](https://forum.duplicati.com/t/correct-syntax-of-compare-command/597/2 "2017-09-12T21:16:45Z")

</div>

> [@jan\_bar](#):
>
> I want to compare versions 0 and 2 but it lists versions 1 and 2. What is wrong?

It is confused because it expects the first argument to be the destination url:

```plaintext
> Duplicati.CommandLine.exe help compare
Usage: compare <storage-URL> [<base-version>] [<compare-to>] [<options>]

  Compares two backups and shows differences. If no versions are given, changes are shown between the two latest backups. The versions can either be timestamps or backup version numbers. If only one version is given, the most recent backup is compared to that version.

  --verbose
    Shows names of files
  --include=<filter>
    Adds an include filter (for verbose output)
  --exclude=<filter>
    Adds an exclude filter (for verbose output)

```

So it wants you to write:

```plaintext
Duplicati.CommandLine.exe compare file://dummy 0 2 --dbpath=C:\Windows\system32\config\systemprofile\AppData\Local\Duplicati\VHKSZYUOFM.sqlite --full-result

```

> [@jan\_bar](#):
>
> When I specify destination URL instead of dbpath, it prompts for passphrase and insist it cannot be empty. My backup destination (USB drive) is without encryption.

Duplicati expects encryption, so you need to add `--no-encryption` to disable the passphrase prompt. This command will read the data straight from the drive without relying on the local database:

```plaintext
Duplicati.CommandLine.exe compare d:\data 0 2 --no-encryption --full-result --no-local-db

```
