I’m trying to compare two backups (most recent to next most recent) to get an idea of what files were backed up in the most job. (In other words, why the heck was that last backup so big???)
I’m trying to use Compare (both in command line and GUI Commandline) but can’t seem to get it to work.
I’m running Duplicati as a service so from a command prompt (doesn’t seem to matter if it’s admin or not) I run: C:\Program Files\Duplicati 2>Duplicati.CommandLine compare C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\LBGGKLSPPC.sqlite
But after entering the encryption passphrase it just spits out the following even though I know the file exists (used it to build the path parm):
No local database, accessing remote store
Listing remote folder …
Operation List with file attempt 1 of 5 failed with message: The folder C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\LBGGKLSPPC.sqlite does not exist => The folder C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\LBGGKLSPPC.sqlite does not exist
If I remove the file name (how does it know which backup I want??) and try I get:
No local database, accessing remote store
Listing remote folder …
Need at least two backups to show differences, database contains 0 backups
Update “2.0.2.5_canary_2017-09-14” detected
Under the assumption that I’m an idiot and the REMOTE local is all that it wants I tried: Duplicati.CommandLine compare ssh://mySSH//mnt/user/Duplicati/TestBackup?auth-username=me&auth-password=mypassword&ssh-fingerprint=ssh-rsa%myfinger
But only get:
No local database, accessing remote store
Listing remote folder …
Operation List with file attempt 1 of 5 failed with message: String reference not set to an instance of a String.
Parameter name: s => String reference not set to an instance of a String.
Parameter name: s
I even reviewed Github but it didn’t clarify anything for me - what am I doing wrong in trying to see what changes happened in the most recent backup?
I think you got commandline parameters wrong - please run this to read more:
Duplicati.CommandLine.exe help
Duplicati.CommandLine.exe help compare
Duplicati.CommandLine.exe help advanced
etc.
The 2nd parameter for compare is storage URL and other parameters always start with – and use = to specify the value.
Good way to learn proper command line is to export backup to commandline in web UI.
I did read though Duplicati.CommandLine.exe help compare a few times already - and did again after your post in case I was missing something, but it still didn’t help.
The suggestion to review what an exported commandline looks like, however DID give me what I needed - QUOTES!
The parameter is expected to be in quotes!
So I can now review what was done in the most recent backup with: Duplicati.CommandLine compare "ssh://mySSH:MyPort/mnt/user/Test?auth-username=<me>&auth-password=<myPass>&ssh-fingerprint=<myFinger>"
Similarly, using the “Restore” UI to get a list of existing versions I can compare the most recent (0) to a backup from 7 days ago by adding the 3rd & 4th parameters: Duplicati.CommandLine compare "ssh://mySSH:MyPort/mnt/user/Test?auth-username=<me>&auth-password=<myPass>&ssh-fingerprint=<myFinger>" 0 7
Similarly, using the “Restore” UI to get a list of existing versions I can compare the most recent (0) to a backup from 7 days ago by adding the 3rd & 4th parameters: Duplicati.CommandLine compare "ssh://mySSH:MyPort/mnt/user/Test?auth-username=<me>&auth-password=<myPass>&ssh-fingerprint=<myFinger>" 0 7
And adding --verbose gets me the full listing instead of just a summary.
Oddly, I can’t seem to use the local database by referencing my local .sqlite (dbpath) file - are only remote folder based listings supported?
Equally oddly, I still can’t seem to get it to run from the Commandline UI.
Not really, but if you do not have quotes, the shell tends to treat various characters to be escape characters (i.e. & and ? have different meanings). Putting quotes around suppresses most escape characters, so the export routine always does it.
As pointed out by @dgcom it thinks the second parameter is the target url, and since you supply a filename, it thinks you are pointing to a folder.
Yes, that does sound strange, it should say something like “invalid number of arguments”.
Can you try again with --debug-output --verbose, I would like to see where the crash happens so we can give a better error message.
That should work with --dbpath=... ?
If you open the commandline UI, you should be able to keep the --dbpath parameter, and clear the rest, except the target url. Then in the “arguments” field type 0 and 7 on two lines.
Ah, I see now - I didn’t understand how the parameters where used and incorrectly assumed the second parameter was purely to point to somewhere with backup info (such as destination OR dbpath). Indeed ADDING `–dbpath=“C:\xxxxx\ABCDEF.sqlite” as the 3rd parameter sped it up and removed the “Listing remote folder” message. Yay!
Sure thing!
Summary
duplicati.commandline compare C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\ --debug-output --verbose
Input command: compare
Input arguments:
C:\Windows\System32\config\systemprofile\AppData\Local\Duplicati\
Input options:
debug-output:
verbose:
Enter encryption passphrase: **********
No local database, accessing remote store
Listing remote folder ...
Duplicati.Library.Interface.UserInformationException: Need at least two backups to show differences, database contains 0 backups
at Duplicati.Library.Main.Operation.ListChangesHandler.Run(String baseVersion, String compareVersion, IEnumerable`1 filterstrings, IFilter compositefilter, Action`2 callback)
at Duplicati.Library.Main.Controller.<>c__DisplayClass31_0.<ListChanges>b__0(ListChangesResults result)
at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
at Duplicati.CommandLine.Commands.ListChanges(TextWriter outwriter, Action`1 setup, List`1 args, Dictionary`2 options, IFilter filter)
at Duplicati.CommandLine.Program.RunCommandLine(TextWriter outwriter, TextWriter errwriter, Action`1 setup, String[] args)
Update "2.0.2.6_canary_2017-09-16" detected
Huzzah! I understand now how the Commandline UI works, thank-you!
While using the “dbpath” Advanced Option worked, for me what worked BEST was to put everything in the “Commandline Arguments” field, then use “Edit as text” to remove ALL “Advanced options” (leaving any in seemed to cause unexpected results).
I tried that on my machine, and it did not give the error message.
Awesome!
Yes, there is some overlap in the arguments and options. If you know what you want, it is easier to just use the “commandline arguments” field. For lack of time I skimped on the argument splitting and just use each line as an argument, but maybe we should fix that so it works like a normal commandline where spaces also delimit arguments.
It looks like the issue is not having quotes around the “ssh://” causes a parsing issue in the parmeters.
This exact command (nothing obfuscated) recreates the issue (put anything but blank in for the passphrase).
"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe" compare ssh://a
Enter encryption passphrase: *
No local database, accessing remote store
Listing remote folder ...
Operation List with file attempt 1 of 5 failed with message: String reference not set to an instance of a String.
Parameter name: s => String reference not set to an instance of a String.
Parameter name: s
Listing remote folder ...
Operation List with file attempt 2 of 5 failed with message: String reference not set to an instance of a String.
Parameter name: s => String reference not set to an instance of a String.
Parameter name: s
...
Ok, I’ve found it. It is the SSH library that expects either a key or a password, but gets a null password and that throws the rather cryptic error message.