Testing backup configuration and "clean" backups

Hello! So far I am digging the concept of duplicati. However, I keep running into major issues. So, here goes my first one.

I am trying to test a simple backup of a drive. In this case, we will say the source is “E:/”. I am using the following command to do so.

Duplicati.CommandLine.exe --s3-server-name="s3.us-west-1.wasabisys.com" --aws-access-key-id="KEY_ID" --aws-secret-access-key="KEY" --use-ssl backup s3://bucketname/testuser "E:/"

This may have been working. However, I initially left out the --s3-server-name variable by mistake so it attempted to connect to AWS S3. I added the variable and retried. From this moment on nothing works… I keep getting lengthy very unhelpful error messages, trace dumps etc.

My Question, to which I have found no answer, is pretty straight forward and I would imagine quite common for sys admins. How do I perform a “clean” backup as instructed by one of the error messages? The error message in question is below.

Error when running the backup as is with the new variable. This happens when I use the same passphrase. So, I thought i’d use a different one to test.

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Duplicati.Library.Backend.S3..ctor(String url, Dictionary`2 options)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Duplicati.Library.DynamicLoader.BackendLoader.BackendLoaderSub.GetBackend(String url, Dictionary`2 options)
   at Duplicati.Library.Main.BackendManager..ctor(String backendurl, Options options, IBackendWriter statwriter, LocalDatabase da
tabase)
   at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)
   at Duplicati.CommandLine.Commands.Backup(TextWriter outwriter, Action`1 setup, List`1 args, Dictionary`2 options, IFilter filt
er)
   at Duplicati.CommandLine.Program.ParseCommandLine(TextWriter outwriter, Action`1 setup, Boolean& verboseErrors, String[] args)

   at Duplicati.CommandLine.Program.RunCommandLine(TextWriter outwriter, TextWriter errwriter, Action`1 setup, String[] args)  

Error with different passphrase:

ErrorID: PassphraseChangeNotSupported
You have attempted to change a passphrase to an existing backup, which is not supported. Please configure a new clean backup if y
ou want to change the passphrase.

How can I do a “clean” backup so I can ensure I am testing a fresh backup every time?

Just to clarify, I do not use the GUI. I am trying to automate this as much as possible.

Welcome to the forum @unplugged216

Using the GUI then doing Export As Command-line is a good way to set up options for CLI automation.
This also gives you the option of using the GUI when you like, e.g. sometimes GUI restore is preferred.
Note that CLI doesn’t directly interconnect with GUI, but sharing the database is enough to do restores.

What Duplicati version is this? From testing, I wonder if you’re trying to put new options into an old one.

Release: 2.0.6.1 (beta) 2021-05-03

S3 and Sharepoint option names on commandline now uses - for consistency (previously used _)

but if that’s the problem, get Release: 2.0.6.3 (beta) 2021-06-17 for an underscore-versus-dash bug fix.

S3 Compatible looks like it’s showing the new dash options without noting pre-2.0.6.x need underscore.

For a CLI backup, you delete the S3 data with some tool, then delete the local database that caches info.
If you did the GUI export, the local DB would be at dbpath. If not, a DB path is made for you and stored in
C:\Users\you\AppData\Local\Duplicati\dbconfig.json (just a text file) based on the destination URL in use.