Cannot import backup configuration

I create backups on GCP Storage. Recently my backup configs were erased. There are some files I found in the server that look like duplicati-{TIMESTAMP} so I downloaded the most recent one. Then in the Duplicati control panel did:

  1. Import backup configuration
  2. Provide file
  3. Provide encryption password
  4. Import

It says “Importing” and then pops up an error message that says Unexpected character encountered while parsing value: P. Path '', line 0, position 0.

The logs provide a more verbose error:

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: P. Path '', line 0, position 0.
  at Newtonsoft.Json.JsonTextReader.ParseValue () [0x002b3] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonTextReader.Read () [0x0004c] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) [0x0004a] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000db] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00054] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Newtonsoft.Json.JsonSerializer.Deserialize[T] (Newtonsoft.Json.JsonReader reader) [0x00000] in <d47de75a7e3f422ca4ca64a654c80495>:0 
  at Duplicati.Server.Serialization.Serializer.Deserialize[T] (System.IO.TextReader sr) [0x0001d] in <dc6921b36116484b82b2af35a9f963b7>:0 
  at Duplicati.Server.WebServer.RESTMethods.Backups.LoadConfiguration (System.String filename, System.Boolean importMetadata, System.Func`1[TResult] getPassword) [0x00059] in <c5f097a49c0a4f1fb0f93cf3f5f218b1>:0 
  at Duplicati.Server.WebServer.RESTMethods.Backups.ImportBackup (Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000f9] in <c5f097a49c0a4f1fb0f93cf3f5f218b1>:0 

Whats the deal? Am I using the wrong file?

Welcome to the forum @warent

Can you elaborate on that? Did the drive break and lose your Duplicati DB area entirely?
There are some configuration errors that can make configs look empty. I want to be sure.

Yes. The dlist file has the list of files in your backup, as of the date in its filename in UTC.

Configs on system live in Duplicati-server.sqlite in DB folder. See Database page.

Configs kept elsewhere for safekeeping come from Exporting a backup job configuration.
The file name contains backup name, and duplicati-config, and ends in .json or .aes.

If you have neither of those, you can still restore data if you saved destination login data,
and Duplicati’s encryption password. Seeing what you saved will help you rebuild config.

What are you trying to do? Is this a Disaster Recovery where you need some files soon?

Hi, thanks for taking the time to reply.

To be more specific on what happened, I initially ran Duplicati on my machine locally for a few backups but realized that even though I’m an admin it did not have permissions to backup all users. So I placed a plist file into a system startup folder which now has Duplicati running as root (I’m running macOS). But in doing so I guess root Duplicati also has a root sqlite file elsewhere that is different from the original one running under the user, because the backups list is empty.

So in theory the config files should still be on my machine under the original user that ran it. But that’s not my primary interest. At this point, I’m using this as an opportunity to act as simulation of a world where I have a bunch of backups in the cloud and no config, so I can be prepared for this event in the future.

This person says Duplicati can regenerate the sqlite file from the back end data automatically, but it’s unclear how it works Duplicati bytes remaining overflow · Issue #4190 · duplicati/duplicati · GitHub

Your citation says

No the job database stays around, it’s just not worth backing up. If it were lost, Duplicati can regenerate it from the back end data automatically.

which I agree with (except I’m not sure it’s truly automatic), but the confusing part is that this database caches information needed to interpret remote data, e.g. for a restore. It does not hold backup configs. Those are in Duplicati-server.sqlite for all of the jobs the server knows of. All of these databases are in ~/.config/Duplicati (I think – don’t have macOS), so if you change Duplicati’s user, move its databases.