Migrating from SQLite to PostGre/MySQL

I am using Orthanc v20.7.1 with the default SQLite database in windows.
Querying, deleting studies is taking a lot of time, so I think I should migrate to PostGre/MySql as the SQLite index file has grown to a big 2.3 GB file.

Is it possible to migrate the data from SQLite to PostGre/MySQL?

What is the use of ServeFolders configuration? Is it only for serving some static html data/files or can I point it to a folder containing Orthanc’s SQLite and dicom data?



(1) The process of migrating from SQLite to PostgreSQL is known as “replication”, and is documented in the Orthanc Book:


(2) The “ServerFolders” section in the Orthanc configuration file corresponds to the configuration of the “sample serve folders” plugin:

This plugin indeed allows Orthanc to serve static resources that are stored on your filesystem. It has nothing to do with SQLite or DICOM storage area.



The link to this article does not answer the question, Sebastian. There are too many things left unknown by just pointing to this article. This does not even mention that replication is seemingly only a Linux based process. Secondly, it does not take into account the current version of Orthanc or the order in which to update the core program. Do I update the core program first or upgrade the schema to PostGre from Sqllite and then upgrade the core program? That information would be helpful.

My opinion is that the article is explains all the details and pitfalls of the upgrading process.

There aren’t many one-person open source sofware with something comparable to the Orthanc Book in terms of quality, btw

Obviously, in order to upgrade the database, you need the new version of Orthanc. Otherwise, how could it possibly know how to upgrade the DB?

Also, why are you mentioning that replication is a Linux-based process ? It’s a Python script that is even compatible with both Python 2 and 3.
While most other authors would happily mention that “Python 2 is required” or “Python 2 is not supported”, Sébastien made a universal script. Not a huge deal,
but quite handy anyway. If it does not work under Windows for some reason, please mention it and try to help Sébastien fix the issue.

I am pretty sure that most of Orthanc users would prefer Sébastien taking time to actually improve Orthanc rather than spend his days writing
documentation for every possible new user or scenario. That is what communities should be here for: helping less savvy people.

Some gratitude wouldn’t hurt, either.

Now let’s wait for the OP next questions.