Phantom files on orthanc archive

Dearest, I’m using Orthanc in HTTP mode to store and show CTs. My problem is that I used a external 4TB USB drive as orthanc storage folder and this drive has crashed so I cannot access to orthanc server let’s suppose it was the drive G.
I have solved this problem using a folder on the local computer HD (C) as hortanc storage folder but I still see in the database all the patients stored in the G drive while they dicom are lost, so i cannot even delete them from DB.
this is the string from the log file
“The specified path does not point to a regular file: The path does not point to a regular file: C:\OrthancStorage\b7\33\b73363c7-6769-4f20-99a8-2f51bc843b42”

How can I delete all the entries that point to a regular file?
Thank you in advance
Luca

From what you are describing, it sounds like you are using Postgres or MySQL for a DB with:

EnableIndex to to True and EnableStorage set to False, see: https://book.orthanc-server.com/faq/scalability.html

When you changed the location of the OrthancStorage on the Filesystem, but apparently did not reinitialize the DB, you ended up creating some “orphan” records in the DB because the actual instances were lost when you external 4TB drive crashed.

You might want to explore using one of the methods described here to maybe reinitialize your DB, and then import the instances that you have in your current OrthancStorage folder back into Orthanc. i.e. the Direct access to the filesystem method, but you might lose some Orthanc Specific data that way.

https://book.orthanc-server.com/users/replication.html?highlight=replication

Also, you might want to read over: https://book.orthanc-server.com/users/backup.html?highlight=backup

and just generally gets some assistance or implement a reliable backup system so you are not at risk of losing data like that.

Stephen D. Scotti, M.D.