Rolling back a failed Hyperswitch upgrade

Plan the way back before you upgrade a self-hosted Hyperswitch stack, because database changes, not container images, usually decide whether a rollback is possible.

On this page

Why a Hyperswitch rollback needs a plan before the upgrade

A failed Hyperswitch upgrade is recoverable only if the rollback path was designed before the upgrade started. Once the new release has run against production data, redeploying the previous image may no longer restore a working system, so the team must decide the way back while it still has options. This page covers that planning: why schema changes make rollback harder than redeploying images, how a blue/green cutback works, which backups to take, and the checks that decide when to roll back.

The Hyperswitch upgrade guide describes the blue cluster as a straightforward rollback mechanism if issues appear after the upgrade, and it lists simplified rollbacks among the benefits of GitOps with Argo CD. Those statements describe a mechanism, not a guarantee. A blue cluster keeps the previous application version available, and Argo CD makes it easy to point traffic and desired state back, but both assume the shared database still works with the old version. The team should confirm with the upgrade guide which components are shared and which are duplicated in their chosen layout before relying on that path.

Before the upgrade window opens, the platform team should write down the rollback trigger conditions, the owner who makes the call, the backup and restore steps for PostgreSQL and any other stateful service, and the time limit after which rolling back stops being practical. Each item should be rehearsed in a non-production environment that mirrors the production topology. If a required fact such as the exact schema change set for the target release is not clear from the release notes, confirm it with Hyperswitch and with your own database migration review rather than assuming the change is reversible.

What changes in recent Hyperswitch releases and what each change means for rollback

This table compares recent Hyperswitch release changes against the rollback options they leave you with. Read each row as a question to answer before the upgrade: does this change alter the database, the configuration, or the components that must move together? The main takeaway is that a release that only changes application images is usually reversible by redeploying, while a change that adds a required service or touches schema needs a backup and a tested path back.

ChangeImpact on rollbackAction needed
v1.124.0 makes Superposition a required configuration dependencyRolling back the router image alone may not restore the earlier setup, because the newer release expects a Superposition service to be running.Confirm Superposition runs and is healthy before upgrading, and keep the prior release's configuration so the old images can be restored.
Roughly monthly minor releases (v1.126.0, v1.127.0, v1.128.0)Each release is a separate step, so skipping several versions widens the gap you must reverse and multiplies the schema and config changes involved.Upgrade one release at a time where possible, and record the exact version you can roll back to before each step.
Compatibility matrix for Control Center and web client in each releaseIf the router rolls back but the Control Center or web SDK stays on the newer version, the dashboard and client can fail against the older API.Roll back the router, Control Center and web client together, using the matrix in the release you are returning to.
PostgreSQL schema changes in the releaseSchema changes are applied to the live database and are not undone by redeploying old images, so the old application may not run against the new schema.Take a verified backup before migrating, and confirm whether the release's migrations are reversible before you start.
Configuration changes between releasesOld images may read new configuration keys incorrectly or ignore them, and environment variables can override the restored settings.Keep the previous TOML and Helm values under version control and diff them against the new release before cutover.
Shared PostgreSQL and Redis during a parallel rolloutA green stack that writes to shared data can leave blue unable to resume cleanly if it returns to the older version.Confirm with the vendor and your own tests whether the new version writes data that the old version cannot read, and decide the cutback point in advance.

Why schema changes make rollback harder than redeploying images

Rolling back the router image is fast, but rolling back the database is not. Redeploying a previous Hyperswitch image takes minutes, and that speed is why teams plan around it. The catch is that a newer release may have already applied schema migrations to the shared PostgreSQL database before the old image starts. The older router was built against the previous schema, so it may fail to read or write tables and columns the new release changed or added. Reverting the code does not revert the data, and no image tag undoes a migration that has already run.

This changes the upgrade order. Any rollback plan has to assume that the schema is one-way unless you have proven otherwise for your versions. Before the upgrade, confirm with the Hyperswitch release notes and upgrade guide whether each target release includes migrations, and whether the previous application version tolerates the new schema. Then decide where the point of no return sits: the moment a migration runs against production. Take a restorable backup immediately before that step, and make sure the team knows that restoring it discards any payments and configuration written after the backup was taken.

The exact migration files for each version you skip, and how to run them in sequence, are covered in the sibling topic on applying Hyperswitch database schema migrations during upgrades. This section only sets the principle that the rollback plan must be built around the data, not the images. Ask your Hyperswitch contact or check the release notes for any release that documents a non-reversible change, and treat that release as a checkpoint that requires a tested restore path before you proceed.

Choosing between blue/green cutback, image redeploy and restore

Redeploying the previous image on the same cluster is the fastest path back when the failed upgrade changed only application code. The Helm release or Argo CD application points again at the earlier router, consumer, producer and drainer image tags, and the pods roll back in place. This works only when the database schema is still compatible with the older binaries. If the newer release applied migrations that remove or rename columns, the old images may fail on startup or write incorrect data, so the rollback path must be checked against the migration files for every version skipped.

  • Schema compatibility: Confirm that the earlier release can read the tables as they now exist. Additive migrations are usually easier to live with than destructive ones.
  • Configuration drift: Keep the previous Helm values and environment variables under version control, so the old image starts with the settings it expects.
  • Data written during the window: Payments and refunds created by the new release remain in PostgreSQL. Ask the vendor and your own tests how the older release handles those records.
  • Shared dependencies: Redis and PostgreSQL are not rolled back by an image change. Any cache or queue state written by the new release stays in place.
  • Operator access: Someone must be able to trigger the rollback without a fresh build, and the pipeline must not rebuild the old tag from source.

Before relying on this path, rehearse it in a non-production environment with a copy of the production schema and confirm the old release starts and processes a test payment.

Backups and preparation to complete before the upgrade starts

A rollback is only as good as what was captured before the upgrade began. The cards below cover the database, configuration, customizations, a matching staging environment and the Superposition prerequisite, so that each one can be restored or checked independently if the upgrade goes wrong.

Verified PostgreSQL backup and PITR

Take a fresh backup of the Hyperswitch PostgreSQL cluster immediately before the upgrade, and restore it to a scratch instance to prove it works. Point-in-time recovery needs continuous WAL archiving in place, so confirm that archiving is active and that you can restore to a timestamp just before the first migration runs. A backup that has never been restored is an assumption, not a rollback plan. Record the restore time, because it determines how long the decision window really is.

PITR documentation

Helm values and configuration snapshot

Export the Helm values currently applied to each release, along with the TOML configuration and every environment variable that overrides it. Environment variables take precedence over the TOML file, so a snapshot of the TOML alone can mislead you about what was running. Store the snapshot in version control with the image tags and chart version, so you can redeploy the exact previous state. Confirm that secrets are referenced rather than copied into the snapshot.

Inventory of customizations and connectors

List every custom connector, patch, routing configuration, webhook endpoint and Control Center setting that differs from the defaults. Note which upstream version each customization was built against, because a rollback to an older image may not carry a local change that was made after the upgrade began. Include the connector credentials and processor-side webhook URLs that must stay valid during a rollback. This list tells you what to test in staging and what to verify after any reversal.

Staging environment on matching versions

Keep a staging stack that runs the same current versions, the same chart, the same configuration keys and a restored copy of production data or a representative subset. Run the full upgrade and the rollback path there first, including the database restore. Staging proves the procedure, not the outcome, so measure how long the rollback takes and which steps need a person to act. Staging that differs from production in versions or configuration will not show you the failure you are planning for.

Superposition running before v1.124.0

If the target release is v1.124.0 or later, confirm that a Superposition service is running and reachable before you start, because the v1.124.0 release notes make it a required configuration dependency. Check that the deployment can reach Superposition from the router and that the service is healthy in the environment you are upgrading. Without it, the upgraded router may fail to start, and that failure should not be mistaken for a bad release. Treat this as a gate: no change window opens until it passes.

The upgrade sequence and the rollback point at each step

The sequence keeps a known-good version available until the new release has passed checks, so the team always knows whether a failed upgrade can be undone by switching images and traffic or whether it needs a database restore. Each step names the check that closes it and marks where that changes.

  1. Confirm the supported upgrade path

    Before touching anything, the platform owner reads the release notes and compatibility matrix for every version between the current and target release, and confirms the router, Control Center and web SDK versions that will be deployed together. Any required new service, such as the Superposition dependency introduced in v1.124.0, is listed as a prerequisite. The step is done when the team has a written version set and a list of prerequisites that a second engineer has reviewed. Rollback at this point is trivial because nothing has changed.

  2. Take a consistent backup of PostgreSQL and configuration

    The database owner takes a backup of the PostgreSQL cluster that Hyperswitch uses, along with the Helm values, TOML settings, environment variables and secrets references that define the current release. Continuous archiving supports point-in-time recovery if the platform already has it configured, so the team should confirm the archive is current before proceeding. The step closes when the backup is stored outside the cluster and its completion is recorded. This is the last point at which a failed upgrade can only be undone by a restore, so the backup must exist before any schema change.

  3. Restore the backup in staging and test it

    The team restores the production backup into a staging environment with the same PostgreSQL major version and comparable configuration, then confirms the restored database starts and that the current release runs against it. Restore time is measured so the team knows how long a real restore would take during an incident. The step closes with a recorded restore time and a passing smoke test on the restored data. If the restore fails here, the production backup strategy is wrong and the upgrade should stop until it is fixed.

  4. Deploy required dependencies alongside the current release

    Dependencies that the target version needs, such as the Superposition service for v1.124.0 or later, are deployed and health-checked while the current router still serves traffic. Because the current release does not depend on them, they can be removed again with no effect on payments. The step closes when each dependency reports healthy and the current release still passes its own health checks. Rollback here is still an image or configuration removal, not a restore.

  5. Apply schema migrations and mark the restore boundary

    The database owner runs the schema migrations for the versions being skipped, in the order the release documents, and records the migration version in the change log. Once a migration has run, the previous application version may not work against the new schema, so this is the point where rollback becomes a database restore to the backup taken earlier, and any payments written after the migration would be lost unless the team has a plan for replaying them. The step closes when migrations report success and the old release is confirmed to be unusable or unverified against the new schema. Confirm the exact compatibility of each migration with the vendor before running it.

  6. Bring up the new router and Control Center

    The new router and Control Center are started on the green cluster or as a new rollout in place, using the version set confirmed in the first step. The platform owner checks that pods are ready, logs show no startup errors and the new Control Center points at the new router. The step closes when the new stack is serving internal traffic and the old stack is still running and ready to take traffic. Rolling back at this point is a traffic switch if blue remains intact, though a shared database means it still carries the schema change from the previous step.

  7. Run smoke tests and define rollback triggers

    The team runs authorization, capture, refund and webhook tests against the new stack using sandbox or test processor credentials, and checks dashboards for error rates, latency and failed webhook deliveries against the baseline from the old release. The rollback criteria, such as a failing payment flow or sustained error growth, are written down before shifting traffic so the decision is not made under pressure. The step closes when every smoke test passes and the criteria have been signed off. Failing a smoke test before traffic moves is a reason to stop and investigate rather than roll back.

  8. Shift traffic and hold the old version

    Traffic is moved to the new stack in controlled steps, with the old stack kept running and unchanged for a window the team agrees in advance. During that window, the rollback path is a traffic switch back to the old stack, which is only safe if the schema has been kept compatible with it, so the team should confirm that with the vendor before relying on it. The step closes when the old stack is decommissioned only after the agreed hold period passes without triggering a rollback criterion. Any rollback after the migration step needs the restore plan, not just the image switch.

How the rollback decision path branches from smoke tests to cutback or restore

The path starts after each upgrade phase, when the team runs smoke tests against the green stack. It checks service health, payment authorization success, webhook delivery and reconciliation totals before moving on. If a check fails, the decision turns on one question: did the migrations run? When the schema is unchanged, the team can roll back the images. When migrations ran, the team restores the database from backup before cutting traffic back to blue, because the older images may not read the upgraded schema.

The checks after each phase decide between continuing, rolling back images or restoring the database.

The checks that decide when to roll back

The team should agree on the rollback criteria before the upgrade window opens, not during it. Each criterion needs a named owner, a measurement source and a threshold set from the team's own pre-upgrade baseline. The owning team should set those thresholds itself, because payment volume, processor mix and normal error rates differ widely between merchants and no published figure fits every deployment. The criteria to agree on cover five areas: failed health checks on the router and the scheduler services, rising error rates on payment authorization, a growing webhook or scheduler backlog, Control Center login failures for operators and reviewers, and reconciliation mismatches between Hyperswitch records and processor settlement reports. Write down who can call a rollback, how long a breach may persist before the call is made, and which dashboards and logs the on-call engineer checks first.

Reconciliation and backlog checks deserve particular attention because they can drift quietly after the application looks healthy. A scheduler queue that grows slowly, or payment records that stop matching processor reports, may not trip a health probe for hours. Confirm with your own monitoring setup which Redis-backed queue depths, webhook delivery failures and settlement comparisons you can observe, and test each alert against a staging upgrade before relying on it. Control Center login failures matter for a different reason: if operators cannot sign in, they cannot pause routing or inspect failing payments during an incident, so that failure should trigger the decision on its own.

A common mistake is treating PostgreSQL failover as a rollback. The PostgreSQL documentation states that the database does not provide software to detect a primary failure and notify the standby, so automatic failover depends on external tooling that your team must select, deploy and test. Promoting a standby moves the database role but does not reverse an application or schema change, so it cannot restore the previous Hyperswitch version by itself. Before the window opens, confirm which mechanism restores the previous application state, which restores the database to a known point, and who has authority to run each one.

What makes a rollback plan longer to design and test

This table lists the factors that expand the design and test work for a Hyperswitch rollback plan, with the reason each one adds effort and what to confirm in your own environment. Read each row against your current version, your target version and your database and cache setup. The main takeaway is that schema changes and state held outside the containers, not the image tag, decide how hard a return to the previous version will be.

DriverWhy it adds effortWhat to confirm
Skipped releases and migrationsEach release you skip can add database migrations, so a rollback must reverse or tolerate more schema changes and more configuration changes.Which release versions sit between your current and target versions, and which of them include database migrations (the upgrade guide and each release's notes).
PostgreSQL database size and restore timeA rollback that restores from backup must replay or copy the whole database, so a large dataset lengthens the rehearsal and the decision window.Measured restore time for your largest backup in a non-production copy, and whether point-in-time recovery is configured.
Custom connectors and customizationsCustom connectors, forked images or local patches must be rebuilt, retested and kept compatible with both the old and new versions.Which images and connector code you run that are not upstream builds, and who maintains them for each version.
Blue/green availabilityA parallel cluster keeps the old version runnable for cutback, but only if both sides can read the same database and configuration.Whether a second cluster and traffic switch are available, and whether both versions can run against the same schema at the same time.
Redis stateRedis holds cache and scheduler queue data, so a rollback may need to flush, drain or preserve queued work to avoid stale or duplicated jobs.What the scheduler queue holds during the change window and whether the old version can read the new queue format.
Number of environmentsEach environment (development, staging, production) needs its own rehearsal, backup and rollback test, and drift between them hides failures.Whether staging mirrors production in version, Helm values, database size and Redis configuration.
Compatibility of Control Center and SDKA rollback of the app server alone can leave the dashboard or web client ahead or behind, so the rollback set must cover every component.The compatibility matrix for each release and which Control Center and web client versions you run.
Superposition or other required servicesA newly required service must be present for the new version, and it must also be handled when you return to the old version.Whether the target release adds a required service, and whether the previous release still runs when that service is removed.

Questions teams ask before planning a Hyperswitch rollback

What drives the cost of planning a Hyperswitch rollback?

The main driver is how much of the upgrade path touches the database. A rollback plan for a stack where only images change is short. A plan that must cover schema migrations, a required Superposition service, configuration changes and a parallel cluster takes longer and needs more test runs. Cost components are the engineering time to map the rollback path, the staging environment used to rehearse it, and the backup and restore tests. Ask any partner for a written scope that lists which of these are included, which environments are used, how many rehearsals are planned, and what is delivered at the end, such as a runbook and rollback decision checklist. Some costs recur, such as keeping backups tested and the runbook current with each monthly release.

How long does rollback planning take for a self-hosted Hyperswitch stack?

No duration is fixed by the researched facts, so the honest answer depends on the stack. Timing is driven by the number of releases you might skip, whether the upgrade adds required services such as Superposition in v1.124.0, how many PostgreSQL and Redis components run in your environment, and how many rehearsals your change window allows. Before you commit to a date, ask for the planned phases, the environments each phase needs, and the checks that must pass before go-live. Confirm the exact sequence against the upgrade guide in the Hyperswitch docs, because the steps depend on the target version.

What does the rollback plan need from our internal team?

The plan needs people who own four things: the Kubernetes or Helm deployment, the PostgreSQL cluster and its backups, the Redis instance, and the decision to roll back. Your team must provide access to a staging environment that mirrors production, a recent backup you can restore, and the agreed success criteria, such as error rates, payment authorization rates and webhook delivery. Someone with authority to call a rollback must be named and available during the change window. Without these, the rollback plan stays theoretical.

Can our team plan and run the rollback alone?

Often yes, if you already run the stack and your team has tested database restores. The areas that most often need outside help are the rollback decision rules, the rehearsal of a schema rollback, and a blue/green cutback that keeps Postgres and Redis shared. Ask yourself whether anyone on the team has restored PostgreSQL to a point in time, and whether the team has rolled back a Helm release under pressure. If not, a partner can plan and rehearse the path while your team runs it. Either way, document who makes the call and what evidence triggers it.

Do we need a blue/green cluster to roll back a Hyperswitch upgrade?

No. The Hyperswitch upgrade guide describes a blue cluster as a straightforward rollback mechanism when issues appear after an upgrade, and it lists simplified rollbacks as a benefit of GitOps with Argo CD. A parallel cluster makes switching back fast because the old version still runs, but it adds cost and operational work. The alternative is redeploying the previous images, which works only if the database schema is still compatible with the older version. Decide based on whether the upgrade changes the schema in a way the old release cannot read, and whether you can restore a backup within your outage tolerance.

Why is rolling back a schema change harder than redeploying images?

Redeploying images returns the application code to an earlier version, but the database does not return with it. If a newer release applied migrations that an older release cannot read, the older application can fail even though its images are correct. PostgreSQL minor releases do not change the storage format, but a Hyperswitch schema migration is a separate change that you must plan for. Before upgrading, identify which migrations the release applies, whether they are reversible, and what backup point you would restore to if they are not. Confirm the steps with the Hyperswitch docs and your own staging tests.

When should we call a partner for Hyperswitch rollback planning?

Call a partner when the upgrade crosses a required dependency, when your team has not rehearsed a database restore, or when the payment flow cannot tolerate a long outage. Also consider a partner when the change touches a PCI DSS scoped environment, because the rollback path must keep card data handling and audit logs intact. Ask any partner for a fixed-scope written proposal that names deliverables, such as the rollback runbook, the decision checklist, the rehearsal results and a retest after changes. DeployOpen plans, implements, backs up, upgrades and documents self-hosted open-source platforms inside your own infrastructure, and most engagements are fixed-scope and agreed in writing before work starts.

How DeployOpen works on this

DeployOpen plans, builds and documents the way back from a Hyperswitch upgrade before the upgrade starts, inside the infrastructure you control. The work covers the rollback decision criteria, the backup and restore path for PostgreSQL and configuration, the blue/green cutback and the verification steps that confirm the stack is healthy again.

How we scope

  • Written scope lists the Hyperswitch components, environments and versions covered by the rollback plan before work starts.
  • Scope identifies which schema changes, configuration changes and Superposition service dependencies would block a simple image rollback.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing and a quote following from that scope.

How we build

  • We write the rollback runbook covering image reversion, blue/green cutback and database restore steps, each with named owners.
  • We set up and test PostgreSQL backups and point-in-time recovery in a non-production copy of your environment.
  • We define the go or no-go checks, such as error rates, payment authorization health and webhook delivery, that trigger a rollback.

How we hand over

  • You receive the rollback runbook, the decision checklist and the backup and restore procedures in documented form.
  • Your team rehearses a rollback in a staging environment, and we record the observed timings and any gaps found.
  • We document which rollback steps need your cloud, Kubernetes or database administrators, so responsibilities are clear on upgrade day.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, so the rollback plan keeps pace with each new Hyperswitch release.
  • We can retest the rollback procedure after changes to the Helm chart, database version or Argo CD configuration.
  • Confirm with DeployOpen how retainer coverage applies to upgrades you run without our hands-on involvement.

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.