Learn how to recover databases and change the storage format of existing databases

Good day, everyone.

I have two questions.

If my orthanc configuration is:
“PostgreSQL”: {
“EnableIndex”: true,
“EnableStorage”: false,
“Host”: “bbdd_orthanc”,
“Port”: 5432,
“Database”: “orthanc”,
“Username”: “orthanc”,
“Password”: “orthanc”,
“Lock”: true

}
That is, storing metadata in PostgreSQL and the images in a directory. Is this correct?

  1. What happens if the database crashes? How can I access the list of studies again?

  2. In another orthanc configuration, the default one, all DICOM data is saved in a specific directory. If all my studies are in the format “1.2.840.10008.1.2.1”, how can I convert them to another format, for example, “1.2.840.10008.1.2.4.90”? One option is to set up another Orthanc and send the studies one by one, via a script or by selecting them all. Is this the only option?

Since I have 50k studies in the format “1.2.840.10008.1.2.1”, they are taking up too much space.

Thank you in advance.

Hi @cristian2025,

Then, you need to re-import the files with a script like importDicomFiles.py (reference)

There is another option:

  • update the configuration "IngestTranscoding": "1.2.840.10008.1.2.4.90"
  • run the Housekeeper plugin. In your case, this config should be enough:
"Housekeeper": {
  "Enable": true
}

Optionally, you may add a Schedule section to run it only during the nights and week-ends.

Hope this helps,

Alain.

1 Like

Thanks Alainmazy

It was more or less what I imagined.

The first thing is really to start from scratch by sending studies; I’ve done it before, there’s no other way, but I wanted to be sure.

And the second thing, these lines: “Housekeeper”: {
“Enable”: true
}, I add them to my config.json, right? Then I could add the date and time options for when it should run, as shown in: Housekeeper plugin — Orthanc Book documentation

Thanks again for the help.

yes