Redundant Files

Hello together,

I recently updated the index database from SQLite to Postgres. I used a simple Migration script, which loads all files from disk into my new orthanc instance.

Now comes my problem. I used the same storage area for the files as in the old orthanc instance (I hoped that only the index database would rebuild since I deactivated EnableStorage in the postgres driver). I noticed that the occupied memory of the file storage doubled, but the indexing seems to be correct (orthanc is running fine).
I think that there are files on my disk that are not tracked by my index database.

Is there a way to delete the duplicated (and maybe untracked files) from the storage are without loosing the correctly indexed files?

Kind regards, Paul :slight_smile:

Hi Paul,

There is no script or tool for that but here are a few options:

  • perform a third migration from Postgres to Postgres and, this time, use a different target storage directory. Then delete the current storage folder with duplicates (of course, you’ll need 3x the space)
  • Export the uuids of the PostgreSQL DB and delete any file that you find on disk that is not in the list of uuids. You should run that script at night while the uuids list is not changing.

HTH,

Alain.

Hi,
thank you all for the fast response messages. I solved my problem according to your proposes.
I migrated the file storage area onto another location which solved my problem

Gesendet von Outlook für iOS