Orthanc database schema upgrades with --upgrade

When an Orthanc release changes the database schema, the server will refuse to start until you run the upgrade step. This page explains the sequence, the backups and test runs that should come first, and what drives the effort.

On this page

Orthanc database schema upgrades with --upgrade: when the server refuses to start

You are moving an Orthanc instance from an older release to a newer one, and the new binary exits at startup instead of running. That refusal is deliberate. When a release changes the database schema, Orthanc will not silently rewrite an index that other tools, scripts or a second instance may still depend on. It stops, reports that the schema does not match, and waits for you to run the upgrade step explicitly with --upgrade. The supported path is to read the release notes for every version between your current one and the target, and where those notes require it, step through the release line in order rather than jumping straight to the newest build. The current reference points are 1.12.10, 1.12.11 and 1.13.0, released on 2025-11-26, 2026-04-14 and 2026-08-15 according to the Orthanc NEWS file. Confirm for your own path which intermediate releases the notes call out before you plan the sequence.

Treat the upgrade as safe only when two things are in place: a backup you have verified can be restored, and a rehearsal on a copy of the production database. Take the backup with the database running under its usual engine (for SQLite, the index file and the storage area; for the PostgreSQL plugin, a database dump or hot backup agreed with your DBA). Then restore that backup to a separate database, point a staging Orthanc at it with the candidate version, run --upgrade, and record the duration, the log output and any warnings. Repeat the exercise with a realistic study count, because migration time grows with the amount of indexed data and that time is not something the release notes can predict for your archive. Ask your vendor or the project which plugin version matches the core you plan to run before you start the rehearsal.

What changes in recent Orthanc releases and what each change means for the upgrade

This table lists the recent Orthanc releases named in the project's NEWS file and what each one means for a database schema upgrade. Read each row against the release you are moving to, then check the NEWS file and plugin revision notes for the schema changes in every release between your current version and the target.

ChangeImpactAction needed
Orthanc 1.13.0 (released 2026-08-15)Rewrites storage-area access and DICOM parsing and transcoding to improve caching and reduce memory use, so behavior around stored files and memory can differ from earlier releases.Read the 1.13.0 entry in the NEWS file, then test the upgrade on a copy of your database and a copy of your storage before production.
Orthanc 1.12.11 (released 2026-04-14)Intermediate release in the 1.12 line. If you upgrade across several releases, its entry can contain schema or configuration notes you must not skip.Include it in your review of the NEWS file when your current version is older than 1.12.11.
Orthanc 1.12.10 (released 2025-11-26)Intermediate release in the 1.12 line. Changes in this release can affect the path from older 1.12 versions to 1.13.Include it in your review of the NEWS file when your current version is older than 1.12.10.
Schema changes in each releaseSchema changes are listed per release in the NEWS file and in the plugin revision notes. They decide whether Orthanc refuses to start until the database is upgraded.Before any upgrade, list every release between your current and target versions and record which ones mention a schema change.
Split advanced configuration file and stricter startup checksCovered on the upgrade from 1.12 to 1.13 page. These changes can stop a configuration from loading even when the database is ready.Review the configuration against the 1.12 to 1.13 page during the same test run as the schema upgrade.

Why Orthanc refuses to start after a schema change

This is the most common case. An operator replaces the Orthanc binary or Docker image with a release that expects a newer database schema, then starts it against a database still on the previous schema. Orthanc checks the schema version it finds in the database against the version it was built to use. When they do not match and no upgrade has been run, Orthanc stops rather than writing to tables it does not understand. The refusal protects the index from partial or incorrect writes.

  • Check the version pair: compare the Orthanc version that was running with the one you started, and the database plugin version bundled with each.
  • Read the startup log first: the log names the database component that refused to start, which tells you whether the problem is the core index or a plugin.
  • Confirm the database was not touched: if the failed start stopped before any upgrade step ran, the schema should still match the old release.
  • Check configuration changes: a new release can also reject settings that were valid before, so compare the configuration file with the release notes.
  • Do not delete the index to get past the error: the index maps studies to stored files, and removing it forces a rebuild that the operator may not be able to finish.

Before retrying, confirm the release notes for the version you are moving to, including the Orthanc NEWS file, state whether a schema change is listed.

Backups and a test database to prepare before running --upgrade

Six preparation items should be ready before anyone runs the --upgrade step on a production Orthanc. Together they let you return to a known state, rehearse the upgrade on data that matches production, and show who approved the change.

Consistent backup of index and storage

Back up the database holding the Orthanc index and the DICOM storage area as one point-in-time set. If the index and the files come from different moments, studies can appear in the index with no files behind them, or files can exist with no index entry. Confirm that the backup restores both halves and that you have tested a restore, not just a backup job that reports success. Record the time of each backup so the pair can be matched later.

Record the running configuration and versions

Keep a copy of the Orthanc configuration file, the Orthanc core version, the database plugin version and the Docker image tag in use. Without this record, a rollback or a failed rehearsal cannot be reproduced. Capture the exact image digest or package version, not only a tag name, because tags can be moved. The test environment must run the same Docker image and plugin versions that you plan to upgrade to, so that rehearsal results apply to production.

Separate restored database for rehearsal

Restore the backup into a separate database that no production Orthanc can reach, then run the new version against it with the same configuration. Confirm that the schema upgrade completes, the instance count and study list match the source, and that common retrieve and store operations work. Check the restored data size against production, because startup time and disk use scale with the database. Keep the rehearsal database until the production upgrade is closed.

Inventory of customizations and scripts

List every Lua, Python or Java script, custom REST client, authorization plugin setting and reverse proxy rule that touches Orthanc. A schema change or a new plugin version can break a script that depends on an internal behavior, and the rehearsal can only catch what you have tested. For each item, note its owner, the version it was written against and whether it was tested on the new release. Remove scripts that are no longer used.

Rollback plan with restore steps

Write down how to return to the previous state if the upgrade fails. Name the backup set to restore, the previous image tag or package version to restart, and the configuration file to put back. Decide in advance how long the team will try to fix the upgrade before rolling back, and confirm that a restored database can be started on the old version. Note that a schema change may not be reversible in place, so a rollback usually means restoring the backup taken before the upgrade.

Named sign-off and change approval

Agree in writing who approves the production upgrade, who runs it, and who can stop it. Typical roles include the Orthanc application owner, the clinical or radiology lead who depends on the archive, the infrastructure team that holds the database and the security or compliance contact for access changes. Record the approval with the rehearsal results and the backup identifiers so the change can be audited later. Confirm the approval window with the teams that send images to this archive.

How to run the schema upgrade step by step

The sequence moves a schema-changing Orthanc release through a tested copy of the database before production, so the team knows the upgrade works and holds a restore point before touching live data.

  1. Stop writes and drain traffic

    Stop modalities, DICOM peers and API clients from sending new studies, and let in-flight transfers finish or fail cleanly. Confirm in the Orthanc logs and the system status endpoint that no jobs are still writing to the index before you continue. The step is done when the instance is idle and the change window is recorded with the people who will sign off the cutover.

  2. Take a backup of the production database

    Create a consistent backup of the PostgreSQL or other database holding the Orthanc index, and back up the DICOM storage area that the index points to. Record the Orthanc version, plugin versions and configuration files alongside the backup. Test that the backup file can be read by restoring it somewhere else. This backup is the only rollback path once the production schema has been changed.

  3. Restore the backup to a separate database

    Restore the backup into a new, empty database that no production instance can reach, and point a test Orthanc configuration at it with the same storage area or a read-only copy of it. Keep the production database untouched. The step is done when the restored database loads and its row counts for studies, series and instances match the figures recorded before the backup.

  4. Run the new version with the upgrade step

    Install the target Orthanc release and its matching database plugin in the test environment, then start it with the upgrade option against the test database, as described in the official upgrade notes for that release. Watch the startup log until Orthanc reports that the upgrade has finished and the server is running. Note any warnings about deprecated configuration keys, which the team must fix before production.

  5. Verify studies, queries and storage access

    Check that the test instance lists a sample of known studies, opens their series and instances, and serves image frames from the storage area. Run representative C-FIND, C-MOVE or DICOMweb queries from your own workflow, and confirm that uploads and deletions behave as expected. The step is done when the agreed test list passes and any failures are either fixed or documented as blockers.

  6. Upgrade the production database in the same window

    With the test result accepted, repeat the upgrade step against the production database during the same change window, using the same binaries, plugin versions and configuration that passed testing. Keep the verified backup and the test results available until the production instance is confirmed. If the upgrade step fails, stop, keep the production database as it was, and restore from the backup only if the database is in an unusable state.

  7. Start the production instance and confirm

    Start the production Orthanc with the upgraded binaries and the upgrade option removed from the start command, then repeat the verification checks from the test run on live data. Re-enable modalities and API clients in stages and watch the logs for errors. The step is done when the agreed checks pass, the change is signed off, and the backup retention period is set for the rollback window.

How the upgrade path moves a database from old schema to new

The diagram starts at the production database and runs in one direction. A backup is restored to a separate test database, the upgrade step runs there, and Orthanc is started and checked against it. A go or no-go decision sits between the test result and production, so a failed test stops the change before production data is touched. On the go path, a fresh production backup is taken first, then the upgrade runs and the instance is verified. If that verification fails, the pre-upgrade backup is restored. That restore is the rollback branch.

Upgrade path from test rehearsal to production, with rollback to the pre-upgrade backup.

Testing the new version and rolling back if the upgrade fails

Test the new Orthanc version against a separate copy of the database before you touch production, and treat the backup as your only real rollback path once the --upgrade step has run. Restore a recent production database dump into a staging PostgreSQL instance, start the new Orthanc version against it with the same configuration files and plugin versions you plan to use, and then check the functions your users and systems depend on. Run a study query from Orthanc Explorer 2 and from your modality or PACS query, retrieve a study to a test destination, store a known sample image from a modality or a DICOM tool, and call every plugin endpoint you rely on, such as DICOMweb, the authorization plugin and any viewer or object storage integration. Record the results from the current production system for the same requests, including response times, study and instance counts, and error logs, so you can compare the two versions item by item rather than relying on memory.

Plan the rollback before you run the upgrade step, because the old binary usually cannot be trusted once the schema has changed. Orthanc will not start against a database whose schema it does not expect, and a new schema version generally cannot be reverted by starting an older release again, so a failed upgrade is normally recovered by stopping the new version, restoring the database backup taken immediately before the upgrade, and starting the previous Orthanc version against that restored copy. Confirm the restore procedure on staging, measure how long it takes on a dataset of your size, and confirm that files in your storage area remain consistent with the restored index. Ask your vendor or the Orthanc Team which downgrade scripts, if any, exist for the specific schema revision you are moving to. For PostgreSQL server operations, follow the Orthanc Book scalability FAQ for background and the sibling pages on PostgreSQL schema revisions and cluster upgrades in this group for the exact steps, because a multi-instance cluster needs every instance stopped before the restore.

What makes an Orthanc schema upgrade take longer

This table lists the factors that stretch an Orthanc schema upgrade and what to ask for in each case. Read each row as a question to answer about your own archive before you schedule the upgrade window. The main takeaway is that database size, shared instances and the number of environments to rehearse usually matter more than the upgrade command itself.

DriverWhy it mattersWhat to ask for
Database sizeThe Orthanc Book cites production hospital deployments holding more than 65 TB, 340,000 studies and around 150 million instances. Larger indexes and file sets mean longer migrations and backups.A count of studies, instances and total storage, and a measured migration time on a copy of your largest database
Number of instances sharing the databaseSince Orthanc 1.9.2 with PostgreSQL or MySQL plugins 4.0, several instances can read and write one database. Every instance must be stopped or upgraded consistently around a schema change.A shutdown, upgrade and restart runbook covering every node, and confirmation of the plugin version each node runs
Custom Lua, Python or Java scripts and pluginsScripts that query the index directly or depend on internal table layouts may break after a schema change. Each one needs its own test.An inventory of scripts and plugins, and the vendor or maintainer confirmation for each one against the target version
PostgreSQL plugin and server versionSchema revisions are tied to the plugin release. The PostgreSQL server version and its extensions also affect whether the upgrade runs cleanly.The exact plugin and server versions in use, the target versions, and the matching release notes
Storage back end such as S3 or AzureFiles in object storage are not touched by the schema step, but the index must still point to them correctly. Reconciliation and backup of both sides take extra time.Confirmation that index and object storage are backed up together, and how long a restore check takes on your storage
Number of environments to rehearse inA new version usually needs a test database, a staging copy and then production. Each rehearsal repeats the migration and the checks.A list of environments, who signs off each one, and the evidence each rehearsal must produce

Questions teams ask before upgrading Orthanc's database schema

What drives the cost and effort of an Orthanc schema upgrade?

The main drivers are the size and state of the existing database, the number of Orthanc instances and plugins connected to it, how far the target release is from your current version, and how much of the surrounding process you need built. A small single-instance archive with a tested backup and a staging copy is a short job. A large archive with several instances, custom authorization or scripts, and a required validation package takes more work. Cost has two parts: the planning and test work, and the hands-on upgrade window. Ask any quote to list the database size assumed, the number of instances, the test environment provided, the backup and restore check, the rollback plan and the sign-off steps, so you can compare like with like.

Can our team upgrade the Orthanc database schema without a partner?

Yes, many teams do. Orthanc is open source under GPLv3 or later for the core and AGPLv3 or later for the scalability and cloud plugins, so you can run it yourselves. The work is manageable when one engineer owns the procedure, the release notes are read before the change, a copy of production is tested first, and a restore from backup is rehearsed. Partners add value when the team lacks database or DICOM operations experience, has several instances sharing one database, or needs a documented change record for an assessment. Orthanc Team SRL sells deployment, configuration and development services and pre-paid dedicated support hours valid for 12 months, quoted on request.

What does our team need to provide for a schema upgrade?

Plan for four inputs before work starts. First, access to the current database, Orthanc configuration and plugin versions, and the storage area, so the team can read the actual state. Second, a test environment that can hold a copy of the database and run the target Orthanc release. Third, a backup you have verified can be restored, taken immediately before the change, along with a documented restore procedure. Fourth, a maintenance window agreed with clinical and imaging stakeholders, and a named approver who signs off on test results and the go-live decision. Confirm with your change board how long downtime may last before you start, because that window sets how much testing is possible.

How long does an Orthanc database schema upgrade take?

It depends mainly on database size, the number of schema steps between your version and the target, and the hardware running the database. No general duration applies, so measure it on a copy of your own database. Restore a recent backup to a separate server, start the target Orthanc release against it, record how long the schema step takes, and repeat the run to confirm the result. Use that measured number to plan the maintenance window and add margin for the backup and post-upgrade checks. Be cautious with any published duration that ignores your database size and your plugin set.

Does Orthanc have a paid edition that includes schema upgrade support?

No. Orthanc has no paid edition, and the core and official plugins are free software under the licenses described in the Orthanc Book. Paid help comes from Orthanc Team SRL, which sells deployment, configuration and development services, including pre-paid dedicated support hours valid for 12 months. Those hours are quoted on request, so ask Orthanc Team for the current terms and what the hours cover before you assume they include upgrade testing or a rollback plan. Confirm the licensing position for any plugin you add, since plugin licenses can differ from the core.

How is a DeployOpen engagement scoped for an Orthanc upgrade?

DeployOpen scopes most engagements as fixed-scope work, with the scope, deliverables and timelines agreed in writing before work starts. For an Orthanc schema upgrade, the written scope usually sets out the current and target versions, the Orthanc and plugin inventory, the database and infrastructure in scope, the test environment and copy process, the backup and restore check, the upgrade steps and rollback plan, the verification checks and the handover documents. A quote follows from that scope, and DeployOpen does not publish a price list. Ongoing support, upgrades and continuous testing are available as retainers. DeployOpen works inside your infrastructure, so ask for the scope to name the systems it will access.

How DeployOpen scopes and delivers an Orthanc schema upgrade

DeployOpen plans and delivers Orthanc database schema upgrades inside the client's own infrastructure, starting from a written scope that names the Orthanc version, the database back end and the test and rollback steps. The work covers the full path from a staging rehearsal of the --upgrade step to a documented production run and handover to the client's operations team.

How we scope

  • We confirm the current and target Orthanc versions and read the release notes for schema changes before quoting.
  • The written scope names the database back end, plugin versions and the number of Orthanc instances that share the database.
  • We agree in writing whether the work includes staging rehearsal, production run, backup verification and post-upgrade checks.
  • Engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts.

How we build

  • We stand up a separate copy of the database and run the target Orthanc version against it before any production change.
  • We take and verify a backup of the production database and record how to restore it before the --upgrade step runs.
  • We test study retrieval, storage, DICOM and REST access and plugin behavior on the upgraded copy against the client's test cases.
  • We run the --upgrade step under a change plan with stop conditions, so the team knows when to halt and restore.

How we hand over

  • We deliver a runbook covering pre-checks, the upgrade command, expected startup behavior and rollback steps for the client's environment.
  • We document the versions, configuration keys and plugin settings in place before and after the upgrade.
  • We walk the client's operations and administration staff through the runbook and the restore procedure before sign-off.
  • We provide a post-upgrade record of what changed, what was tested and which checks remain open for the client to close.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for Orthanc and its database back end.
  • A retainer can cover the next release review, staging rehearsals and assistance with future schema changes.
  • Ask any provider to confirm in writing who performs the backup, the rehearsal and the production run, and who is on call.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.