Importing json: DB changed

I’m having a problem importing json files.

I’m re-ordering the backup jobs in the interface, and someone suggested in a topic here (sorry, I can’t remember who it was) that one way would be to export jobs to json files and reimport them in the desired order, and so I did.

The problem is that when re-importing the json file the database is changed! See:

  • DB before export:

  • The same DB in explorer (ok!):

db_explorer

  • The DB in the exported json file (ok!):

db_json

What am I doing wrong?

Hmm…that might have been me - sorry if I missed that the databases changed.

This is done on purpose to help avoid accidentally having two jobs pointing to the same database. To resolve this you could do one of these:

  • use the “Database…” menu “Repair” button to rebuild the database at the new location. This is the safest option, but also the slowest as it involves downloading index files (NOT full backups) from the destination
  • in your file manager just rename the old .sqlite file to the appropriate new name. Be careful you’re renaming the correct file!
  • use the “Database…” menu and manually paste the correct / original database path in the “Local database path” field then click the “Save” button (which becomes active after the field has changed). Note that you might be prompted about things including using an existing database. Be careful you’re selecting the correct file!

Yes, it was exactly this topic!

Ok, so it’s that way by design. I understood why.

Yes I had used the third option, I changed the DB name manually in the “local database” field of the interface. Worked perfectly.

Thanks for the clarifications!

@kees-z , it may be good to put this clarification (about creating a new DB when importing configuration files) in item 3.3 of the manual.

1 Like

This text is added to the end of section 3.3 in the manual:

image

1 Like

Oh, ok! I had looked at version 0.5 and in it the text was different:

paragraf

This new text you posted is clearer.

The text above cannot be found yet, I just added it in an unreleased version of the documentation.

1 Like