Why teams move the Superset metadata database to PostgreSQL
Moving the Superset metadata database to PostgreSQL is a contained change to where Superset keeps its own state (users, roles, dashboard definitions, saved queries and database connection records), not a rebuild of dashboards or a change to the data sources they query. The effort depends on three things you control: the Superset version you run, how you handle the SECRET_KEY that encrypts stored credentials, and how much downtime your users will tolerate. The project does not recommend SQLite or the Docker Compose PostgreSQL container for production, which is why most teams running on those defaults reach this point once usage grows or a security review asks where the data lives. The documented supported metadata databases are PostgreSQL 10 to 17 and MySQL 5.7 and 8.x, so confirm your target PostgreSQL major version against that range before you provision anything, and check the Superset configuration documentation for the version you actually run.
Apache Superset is an Apache Software Foundation project released under the Apache License 2.0, and it has no paid edition. That means the move carries no license change and no vendor upgrade gate, and the cost is the engineering and infrastructure work your team or a partner performs. The PostgreSQL side is also open source under the PostgreSQL License. Plan the target instance as a managed service or a self-operated cluster you control, and ask whoever runs it which major versions they offer, how long each is supported, and how backups and point-in-time recovery are configured. A metadata database that cannot be restored to a known point is the risk most worth closing before cutover, because every later step depends on having a clean fallback.
Expect the decisions in this section to shape the rest of the work. Whether you export and import content or copy the database directly, whether the old and new instances share one SECRET_KEY, and whether users can tolerate a read-only window all change the plan. Confirm these three answers with the people who own the Superset instance, the database platform and the user population before scheduling a window. The sections that follow set out each option and the checks that prove the new store is correct.
What moves cleanly and what needs rework during the database move
This table compares each Superset object type with what a database move carries over, what depends on the SECRET_KEY, and what you must re-verify after cutover. Read the middle column for what arrives in the new database and the last column for the checks that prove it works. The main takeaway is that the metadata database holds almost everything, but encrypted connection secrets, cache contents and Celery state need separate handling.
| Metadata object | What the move preserves | Depends on SECRET_KEY or needs re-verification |
|---|---|---|
| Users and local accounts | User records stored in the metadata database move with a dump or copy | Confirm local sign-in works after cutover; SSO users depend on the identity provider configuration |
| Roles and permissions | Role and permission assignments stored in the metadata database | Confirm group-to-role mappings such as AUTH_ROLES_MAPPING still resolve for a test login |
| Dashboards, charts and datasets | Definitions, layouts and dataset records stored as metadata | Open a sample of each dashboard and confirm charts query the warehouse correctly |
| Saved queries | Saved query text and metadata stored in the metadata database | Run a sample of saved queries in SQL Lab against the same database connections |
| Database connection records | Host, port, database name and username entries | Stored passwords are encrypted with SECRET_KEY; the new instance must use the same key or connections fail |
| Alerts and reports | Schedule and recipient definitions stored as metadata | Schedules run through Celery beat and workers, not the database; confirm execution history with the vendor |
| Logs and audit trails | Any log or event tables held in the metadata database move with it | Confirm which logs live outside the database and need separate retention or export |
| Cache, async results and thumbnails | Not metadata; this state does not move with the database | Redis contents, async query results and dashboard thumbnails are rebuilt or lost; plan a warm-up |
| Encryption key during rotation | The database holds data encrypted under the current key only | If rotating, use PREVIOUS_SECRET_KEY during the transition and test every connection afterward |
Export and import versus a database copy
A logical export reads the metadata as SQL or as a dump that a fresh PostgreSQL database replays. The target is a new, empty database, created by Superset's schema migrations, that receives the rows from the source. This method works well when you want a clean target, when the source is SQLite or MySQL, or when you are changing the database engine as well as the host. The Superset version on both sides must match so the schema is identical. Downtime lasts from the moment you stop writes until the import and verification finish, so the drivers are the size of the metadata and how much verification you run before reopening access.
- Same Superset version on both sides: Install the same release against the new database, run the migrations, then load data. Mismatched versions are a common cause of failed imports.
- Empty target schema: Import into a database that Superset initialized, so tables and constraints match. Load data into an existing schema with constraints deferred or disabled only if your tooling requires it.
- Freeze writes first: Stop the web and worker processes so no dashboard, chart, or user changes land between export and cutover.
- Re-check the SECRET_KEY: Encrypted fields such as database connection passwords only decrypt with the key that wrote them, so set the same key on the new instance before anything is read.
- Sequence and identifier checks: Confirm primary key sequences advance past the imported maximum values before the application writes again.
Before reopening access, compare row counts per table and spot-check a sample of dashboards, datasets, and database connections in the UI.
A database-level copy moves the whole PostgreSQL cluster or database, including indexes, sequences, and the physical state of the data, without translating it through SQL. Physical or logical replication from the existing server to the new one is the usual route when downtime must be short. The PostgreSQL documentation describes logical replication as working between different major versions, which can keep the switchover to a few seconds of downtime. Copying also preserves encrypted values exactly, which removes one class of error, but it only applies when the source is already PostgreSQL. A copy into a newer major version still needs the target to run a supported release.
- Source must already be PostgreSQL: Replicating from MySQL or SQLite is not a database copy, so that case belongs to the export path.
- Replication setup and privileges: Plan the publication, subscription, and the role the replication connection uses. These depend on your PostgreSQL version and your network policy.
- Synchronization lag: Wait until the target has caught up and confirm that writes stop on the source before cutover, so no late changes are missed.
- Failover is not automatic: PostgreSQL does not detect a failed primary or repoint clients, so the cutover sequence and any rollback path must be scripted and tested.
- Connection and secret updates: Point Superset's metadata database connection at the new host only after verification, and keep the source available until you accept the result.
Confirm with your database team which replication method your PostgreSQL version and hosting platform support, and who holds the authority to start the switchover.
The right method depends on five conditions: the source engine, the Superset version you are running, whether you are changing PostgreSQL major versions, how much downtime the business accepts, and how much independent verification your change process requires. Export and import fits teams with a non-PostgreSQL source, teams that want a fresh schema, or teams that run a short maintenance window. A database-level copy fits existing PostgreSQL metadata databases, environments where the cutover window is tight, and teams with a DBA who can operate replication. Neither method replaces the Superset upgrade steps if you also change versions.
- Source engine: SQLite and MySQL sources generally need the export and import path, while PostgreSQL sources can use either.
- Version change: If you upgrade Superset in the same window, separate the steps so you can attribute any failure to one change.
- Downtime tolerance: Short windows favor replication, while longer windows make a clean logical load simpler to explain.
- Team skills: A logical load needs Superset and SQL expertise. A replication cutover needs PostgreSQL operations expertise.
- Audit expectations: Record which method was used, the source and target versions, and the verification results so change records can be reviewed later.
Ask your team to write the decision down with the supported versions in your environment, because the PostgreSQL documentation and the Superset configuration documentation define the boundaries for each method.
Whichever method you use, the cutover is not complete until you can show that Superset reads the new metadata database correctly and that nothing was lost or altered. Verification has two layers: database-level checks that compare the source and target, and application-level checks that confirm the instance behaves as users expect. Keep the source database intact and read-only for a defined period so you can reverse the change if a defect appears. The retention period and rollback criteria should be agreed before the window opens, not during it.
- Row counts and checksums: Compare counts per metadata table and, where practical, checksums for key tables such as users, roles, dashboards, and database connections.
- Login and role mapping: Sign in with test accounts from each role and confirm that permissions match the source.
- Encrypted connections: Open a saved database connection and run a test query to confirm the SECRET_KEY decrypts stored credentials.
- Background work: If alerts, reports, or async queries depend on the caching layer and workers, confirm that workers reconnect to the new database and process a test job.
- Backup of the new state: Take a backup of the new database immediately after cutover, following the upgrade guidance to back up the metadata database.
Illustrative example: a team compares counts for twelve metadata tables and finds one mismatch in a table of saved queries, which points to a failed import step that can be re-run before users return. Ask your auditors or internal reviewers which evidence they expect, and define pass or fail criteria in advance.
Documented tools and paths for the metadata move
The metadata move uses a small set of documented tools, and each one covers a different part of the job. Superset's configuration points the application at PostgreSQL, its upgrade guidance sets the backup and migration steps, and PostgreSQL provides the data movement and recovery options. Read each card against the Superset version you run, because exact commands and flags must be confirmed for that release.
Superset's SQLAlchemy connection setting
The metadata database is set through Superset's configuration, which tells the application where its own tables live. Changing this setting only redirects Superset; it does not copy any rows, users, dashboards or saved queries from the old SQLite or container database. Check the connection string, the PostgreSQL version against the supported range, and that the new database is empty before the first start.
Backing up the metadata database first
The upgrade guidance tells operators to back up the metadata database before any schema change, and the same rule applies to a move. Take a snapshot or logical dump of the source before you cut over, and keep it until the new database has passed verification. Confirm with your team how long the backup must remain available for rollback.
Running superset db upgrade and superset init
After Superset points at the new database, superset db upgrade applies schema migrations, and superset init sets up default roles and permissions. These commands prepare the schema; they do not move the data that already exists in the source. Confirm the exact sequence in the upgrade guide for your version, and do not run them against a database you have not backed up.
Logical dump and restore with pg_dumpall
The pg_dumpall utility writes the contents of a whole PostgreSQL cluster as SQL, which can be restored into a new server. It is a simple path for a small metadata database with a planned pause in writes, because Superset must stop during the dump. It does not carry over Superset configuration, secret keys or any file-based settings, so those move separately.
Logical replication for a short cutover
Logical replication copies row changes from a source server into a target, and PostgreSQL documents it as working between different major versions. It suits a move where the source keeps running while the target catches up, with a brief pause at switchover. Setup needs the source to publish tables and the target to subscribe, and you must confirm how schema changes such as Superset migrations are handled during sync.
Continuous archiving for recovery
Continuous archiving and point-in-time recovery store a base backup plus write-ahead log segments, so you can restore the database to a chosen moment. It protects the metadata store after the move and is not a migration tool by itself. Test a restore into a separate server before relying on it, and confirm retention, storage location and who can run the restore.
Keeping SECRET_KEY stable so encrypted metadata still opens
Keep the same SECRET_KEY on the new PostgreSQL-backed instance as the one the source deployment used, because Superset encrypts sensitive values in the metadata database with it. Superset requires a user-specified SECRET_KEY to start, a requirement added in version 2.1.0, so the key is never optional in a production move. Database connection passwords saved in Superset, and other encrypted fields, are stored in the metadata database in a form that depends on that key. If the new instance starts with a different value, Superset will run, but the stored credentials for your analytics connections will not decrypt, and dashboards that depend on those connections will fail until someone re-enters every password.
Before cutover, record where the current key lives (environment variable, Kubernetes secret, or a value in superset_config.py), confirm that the exact same string is delivered to every web and worker container, and store a copy in your secrets manager under change control. Do not generate a new key as part of the database move. Migrating the database and rotating the key are separate changes, and combining them makes a decryption failure hard to diagnose. Confirm with your Superset version's configuration documentation how the key must be supplied and whether any other secrets, such as those used by alerts and reports, depend on it.
If you do need to rotate the key, the configuration documentation describes PREVIOUS_SECRET_KEY for this purpose. Set the new key as SECRET_KEY and keep the old one in PREVIOUS_SECRET_KEY while Superset re-encrypts stored values, then remove the old key once you have verified that connections still work. Confirm the exact re-encryption steps and their supported sequence for your version before relying on them, and test the rotation on a copy of the restored metadata database. Record the key identifiers and rotation date in your change log, since a later restore from backup will need the key that was active when that backup was taken.
Sequence for a PostgreSQL metadata cutover with verification
This sequence moves the Superset metadata store to PostgreSQL in a planned order, so that users, dashboards, datasets and database connections arrive intact and a documented route back exists if the cutover fails. Each step ends with a check you can record before the next one starts.
Inventory the current metadata store and version
Your team records the current metadata database engine and exact version, the Superset version running in production, the Superset configuration file or environment that sets SQLALCHEMY_DATABASE_URI, and the SECRET_KEY source, including whether PREVIOUS_SECRET_KEY is set. Also list the caching layer, Celery worker and beat processes, and any scheduled reports or alerts that depend on them. The output is a written inventory signed off by the platform owner. Confirm the current Superset version against the upgrade documentation before proceeding.
Provision and size the PostgreSQL target
Provision a PostgreSQL instance on a major version within the range Superset documents as supported, which is PostgreSQL 10 to 17 for the metadata database. Confirm with the PostgreSQL versioning policy which majors are still receiving fixes on your cutover date, since 14 is listed as supported only until November 12, 2026. Size storage and connections for your user count and worker processes, and place the database in a network segment reachable only from Superset components. The output is a running instance with a dedicated database and role, verified by a successful test connection from the Superset host.
Take and verify a backup of the source database
Back up the existing metadata database before any change, using the native dump tool for SQLite or MySQL, or a logical or physical backup for PostgreSQL, and store a copy outside the host being changed. Restore the backup into a scratch database to prove it is readable. The output is a restore test log showing row counts for key tables such as users, dashboards, slices, tables and dbs. This backup is also your rollback source, so keep it until the cutover is accepted.
Rehearse the move in staging with the same SECRET_KEY
Build a staging Superset from the same version and configuration, using a copy of the production metadata, the same SECRET_KEY and the target PostgreSQL instance. Encrypted values such as stored database connection passwords depend on that key, so a different key leaves them unreadable. Run the data move, then superset db upgrade and superset init, and record each command's output and any errors. The output is a rehearsal runbook with exact commands, timings you observed, and any manual fixes that the production run will need.
Move the data and start Superset against PostgreSQL
During the production window, stop web servers, Celery workers and beat so nothing writes to the old database. Move the data using the method chosen in the rehearsal, then point SQLALCHEMY_DATABASE_URI at PostgreSQL and run superset db upgrade followed by superset init. Repoint the caching layer and any Celery broker settings only if they reference the old database, then restart workers and beat. The output is a Superset web process that starts cleanly, with the migration logs saved to the change record.
Verify logins, assets and connections
Test a representative set of accounts across each authentication path, including local users and any OAuth or LDAP role mapping, and confirm that roles and group mappings match the inventory. Open sample dashboards, charts and datasets, run a query in SQL Lab, and test each saved database connection, confirming that stored passwords still work. Confirm that scheduled reports and alerts appear and that a manual test run completes through the workers. The output is a signed verification checklist with a pass or fail result for each item.
Run the production cutover and keep the rollback path open
Once staging and production verification pass, announce the window, freeze dashboard and user changes, and run the sequence from the rehearsal. Keep the original database in read-only state rather than deleting it, and write down the trigger conditions for rollback, such as failed logins, missing connections or broken scheduled reports. For rollback, restore the original configuration, restart the old database connection and run the verified backup restore. The output is a cutover record with timestamps, the verification sign-off, and a retention date for the old database set by the platform owner.
How much downtime and how to verify the new metadata store
Does moving the Superset metadata database to PostgreSQL always require downtime?
Not always, but a dump and restore almost always does. A dump and restore stops writes to Superset while the data is exported and loaded, so the window grows with the size of the metadata database, the number of objects and the speed of the network and disks between the old and new hosts. A replication approach keeps the source writable while the copy catches up, then needs only a short switch-over. PostgreSQL's upgrading documentation says logical replication works between different major versions and can allow a major upgrade with only several seconds of downtime. That applies to moving PostgreSQL data between PostgreSQL servers. Moving from SQLite or from a Compose container also changes the source, so confirm with your database team which path the source supports before you plan the window. Stop Celery workers and beat during any cutover so no background task writes to the old store.
What does logical replication across PostgreSQL versions offer in principle?
It lets the new server subscribe to changes from the old one, so the bulk copy runs while Superset keeps working and only the final changes must be applied during the cutover. The PostgreSQL upgrading documentation describes logical replication as working between different major versions, which is the basis for its very short downtime claim. The source-to-SQLite case does not fit this model, because SQLite has no replication stream. Ask your DBA to confirm the details for your PostgreSQL versions, including which objects need to be added to publications, how sequences are handled and whether the source is version 10 or later. Superset supports PostgreSQL 10 to 17 for the metadata database, so check that the target version is inside the supported range in the configuration documentation before you choose it.
How do I verify row counts and object parity after the copy?
Compare counts and object lists per table on both sides before users return. Check the main Superset tables for users, roles, databases, datasets, tables, columns, slices (charts), dashboards, saved queries, alerts and reports, and the Alembic migration version in the alembic_version table. Matching counts alone are not enough, so also compare primary key ranges and a checksum or hash of selected text columns, and confirm that sequences were advanced past the largest copied id so new rows do not collide. Record the results in a signed cutover checklist. Expect some tables to change between the snapshot and the switch, such as logs or query history, and agree beforehand which tables are expected to differ.
How do I test that SECRET_KEY still decrypts stored database connections?
Superset encrypts stored database connection passwords with the SECRET_KEY, so the new instance must use the same key as the old one, or it must be started with PREVIOUS_SECRET_KEY set to the old value. Supported key rotation through PREVIOUS_SECRET_KEY is documented in the configuration guide, and the key is required at startup since version 2.1.0. Test decryption by opening several database connections in the UI and running a test connection on each, then run a query through SQL Lab. Confirm that the key value is stored in your secrets manager and not in a file in the repository. A mismatch usually shows up as connection errors that look like credential failures, so check the key before you reset any passwords.
How do I test logins and roles on the new metadata store?
Sign in with a set of test accounts that cover each role and each authentication path your users rely on, such as local database users, OAuth2 or LDAP. Confirm that group-to-role mapping through AUTH_ROLES_MAPPING still assigns the expected roles, and that row-level security rules still apply to the test users. Check password hashes indirectly by logging in with existing local accounts, and check that sessions and API tokens behave as expected. Reset no passwords as part of the test unless the SECRET_KEY check above has already passed, because a reset hides the failure you are looking for.
How do I confirm dashboards render and queries run after the move?
Open a representative set of dashboards chosen by business owners, including the most used, the most complex and any embedded or public dashboards, then compare the charts and filters to a baseline captured before the cutover. Run a set of saved SQL Lab queries and check that they return the same row counts and results against the warehouse. Check that cached results are rebuilt correctly and that alerts and reports still send. Keep the old metadata database available for a rollback period agreed in advance, since changes made in the new instance will not be copied back automatically.
What should I check in the logs during and after the cutover?
Watch the Superset web and worker logs for database connection errors, decryption or invalid token messages, migration warnings, and repeated failed logins. On the PostgreSQL side, check the server log for authentication failures, connection limit errors, slow queries and replication lag if you used a replication approach. Confirm that the sequences and indexes are in place and that the server is not running out of connection slots once workers reconnect. Keep the logs for the rollback window so you can trace a problem to the time of the switch.
Can my own team do the verification, or do we need a partner?
Your team can do the verification if it has someone who knows the Superset tables, the PostgreSQL server and the secrets process. A partner adds value when the scope includes a fixed plan, a rehearsed cutover and written acceptance criteria. DeployOpen plans, implements, backs up and documents self-hosted open-source platforms in the client's own infrastructure, and most engagements are fixed-scope with scope and timelines agreed in writing before work starts. Cost depends on the number of environments, the size of the metadata database, the migration path, the number of dashboards to check and the amount of rehearsal required. Ask for a quote that lists each verification step, who runs it and what evidence is handed over.
What drives the cost and duration of the move
This table lists the factors that set the effort of moving the Superset metadata database, with what each one changes and how to keep it manageable. Read it as a checklist to bring to a quote: the larger and less documented the source and secrets, the more rehearsal and verification the move needs. The main takeaway is that the database copy itself is rarely the long part; inventory, secret handling and rehearsals in every environment usually decide the schedule.
| Driver | Why it changes effort | How to keep it down |
|---|---|---|
| Metadata size and history | Years of dashboards, query history, logs and report schedules increase copy time and verification scope. | Ask what can be pruned or archived before the move and confirm which tables hold audit history you must keep. |
| Database connections and encrypted secrets | Each stored connection password is encrypted with SECRET_KEY, so every credential must be re-keyed or verified after import. | Inventory connections in advance and confirm the SECRET_KEY in use for every environment before export. |
| Superset version and upgrade distance | The metadata schema must match the target version, so a large gap means more migrations to run and test. | Confirm the source and target versions, then check UPDATING.md for breaking changes between them. |
| Source: SQLite or Compose container | SQLite files and Compose volumes need different export and copy steps, and the Compose container may hold data outside the expected path. | Identify the exact file or volume and confirm backup integrity before any cutover planning. |
| Availability requirements | Tolerating only a short outage requires a rehearsed cutover window, while a longer window allows a simpler export and import. | Agree the acceptable window in writing and rehearse the cutover against it. |
| PostgreSQL platform and backup design | Choice of managed or self-run service, backup retention, point-in-time recovery and standby design each add setup and testing work. | Confirm which backup and restore tests the platform team already runs and whether they cover the new database. |
| Connection pooling with PgBouncer | A pooler adds configuration, authentication passthrough checks and load tests before it sits in front of Superset. | Decide early whether the pooler is in scope and include its configuration in the same rehearsal. |
| Authentication method | SCRAM, client certificates or an external method such as LDAP or OAuth each need different role, network and client configuration. | Choose the method with the platform owner before building roles, and confirm which methods the managed service supports. |
| Number of environments to rehearse | Each environment with its own data, SECRET_KEY and network path needs its own rehearsal and verification pass. | Rehearse in the lowest environment first and reuse the same runbook, then record differences. |
What usually goes wrong with metadata database moves
Most failed metadata database moves fail on configuration and sequencing, not on the data copy itself. The risks below share a root cause: the new database, the application, the cache and the users must all agree on the same state at the moment of cutover.
Changed or lost SECRET_KEY
Superset requires a user-specified SECRET_KEY to start, and it is used to encrypt sensitive values stored in the metadata database, such as database connection passwords. If the new environment uses a different key, those values cannot be read after cutover. Prevention: store the exact current key in your secrets manager before the move, deploy the same value to the new instance, and confirm that an existing database connection still tests successfully. If you rotate keys, use PREVIOUS_SECRET_KEY deliberately rather than by accident.
Unsupported PostgreSQL major version
Superset is tested with PostgreSQL 10 to 17 as its metadata database, so a target running PostgreSQL 18 or an older release outside that range falls outside what the project tests. Checking the target version against the Superset configuration documentation before provisioning avoids a surprise during migration. Prevention: confirm the target major version, then confirm that your PostgreSQL platform's own support window covers the expected life of the deployment.
Missing or untested backups
A copy of the metadata database that has never been restored is not a backup. The database holds dashboards, datasets, users, roles and saved connection details, and the upgrade guide tells operators to back up the metadata database before any schema change. Prevention: take a dump before cutover, restore it into a scratch PostgreSQL instance, start Superset against that copy, and record the result before the production move.
Cache or workers left on the old database
Celery workers, beat and the caching layer run separately from the web application, and any one of them still configured with the old metadata connection will write to the retired database. Alerts, reports and scheduled tasks may then appear to run while changes land in the wrong place. Prevention: change the connection string for web, workers and beat together, stop the old workers before cutover, and check that scheduled reports reference the new database after the first run.
Stale sessions after cutover
Users who were logged in against the old database may hold session data that no longer matches the new database, producing login loops or errors after the switch. Sessions and permissions created during the final hours before cutover may also be missing from the copy. Prevention: schedule the cutover during a quiet window, announce a forced re-login, and verify that a test administrator and a standard user can sign in and reach their dashboards on the new database.
No tested rollback path
If verification fails after users have been directed to the new database, teams without a rollback plan end up repairing data under pressure. Rollback needs the old database kept intact and read-only, a documented configuration change to point back to it, and a decision point with named owners. Prevention: write the rollback steps as a runbook, rehearse them in staging, and set the criteria that trigger a rollback before the cutover begins.
Questions teams ask before moving Superset metadata to PostgreSQL
What drives the cost of moving the Superset metadata database to PostgreSQL?
The main cost drivers are the size and age of the existing metadata, how many environments need the move, how much downtime the business will accept, and how much verification the team wants before cutover. A small internal instance on SQLite with few dashboards is a different job from a multi-environment deployment with Celery workers, scheduled reports and a database that has been upgraded several times. Part of the cost is one-time (planning, the cutover itself, verification) and part recurs (backups and the managed database service you run afterward). Ask any partner for a written scope that separates these, names who performs each task, and lists what the client team must provide, such as database credentials, network access and a staging copy to test against.
How long does the migration take?
No duration is fixed in advance because it depends on the size of the metadata, the number of Superset environments, the network path to the new database and the downtime window agreed with stakeholders. Two approaches have very different timing. An export and import of Superset assets is usually planned around a maintenance window, while a database-level copy or logical replication can keep downtime short but adds setup and validation work before cutover. Ask for a timeline that breaks the work into staging rehearsal, cutover and post-move verification, and confirm which steps stop users from logging in.
What does the client team need to provide?
Expect to provide a named owner for the Superset instance, access to the current deployment and its configuration files, a staging environment that mirrors production, and a managed PostgreSQL instance inside your network controls. The team also needs the business owner to approve a downtime window and someone who can confirm dashboards and users work after cutover. Plan for access to the secret store where SECRET_KEY is kept, because the new deployment must start with the same value or existing encrypted data becomes unreadable.
Can our own team do this migration without a partner?
Yes, if your team already runs Superset and PostgreSQL in production, has tested backup and restore procedures, and can rehearse the move in staging. The work is mostly careful sequencing: back up, stop writes, move the data, run the Superset database upgrade commands, and verify. Teams without recent PostgreSQL operations experience often choose a partner for the database side, while keeping Superset configuration and dashboard checks in-house. Whichever route you choose, the written scope should say who owns each step and how rollback works if verification fails.
How do we handle SECRET_KEY during the move?
Use the same SECRET_KEY on the new deployment that the old instance used. Superset requires a user-specified SECRET_KEY to start, a requirement added in version 2.1.0, and the value protects data stored in the metadata database, including database connection credentials. If you need to change the key, the configuration documentation describes rotation with PREVIOUS_SECRET_KEY, which should be planned and tested in staging before cutover. Confirm where the key is stored, who can read it, and that it is backed up separately from the database dump.
Which PostgreSQL versions does Superset support for the metadata database?
The Superset configuration documentation lists supported metadata database versions as PostgreSQL 10 to 17 and MySQL 5.7 and 8.x. PostgreSQL 18 is not in that list, so confirm current support with the Superset release you will run before choosing it. Also check the PostgreSQL versioning policy, since PostgreSQL 14 is listed as supported only until November 12, 2026. Choose a version that is inside both the Superset support list and the PostgreSQL support window for the life of the deployment.
Is the Docker Compose PostgreSQL container supported for production?
No. The Superset architecture documentation says the SQLite default and the Docker Compose PostgreSQL container are not recommended for production. Moving to a managed PostgreSQL instance with tested backups, access control and a planned upgrade path is the reason this migration exists. Plan the move so the database has its own backup schedule, restore test and monitoring, and so the Superset application connects to it through a stable hostname that survives later changes.
How DeployOpen scopes and delivers the metadata database move
DeployOpen plans the move of your Superset metadata database to PostgreSQL in infrastructure you control, starting from a written scope that names the source, the target, the cutover method and the verification steps. We build and rehearse the move in a staging copy, then hand over a runbook and evidence your team can repeat and audit.
How we scope
- We inventory the current metadata database, Superset version, SECRET_KEY handling and any encrypted database connection passwords before recommending a method.
- The written scope states the chosen approach, export and import or database copy, and whether it covers downtime windows, rollback and staging rehearsals.
- We confirm the target PostgreSQL major version against Superset's supported range and your organization's lifecycle policy, and list what your team must provide.
How we build
- We stand up the target PostgreSQL instance, roles, network paths and backups in your environment, and configure Superset to point at it in staging first.
- We rehearse the migration on a copy of production data, run the upgrade steps in the Superset upgrade guide, and record each step and its timing.
- We test login, SECRET_KEY decryption of stored connections, dashboards, scheduled reports and row level security rules before any production cutover.
How we hand over
- You receive a cutover runbook with the exact sequence, go and no-go checks, rollback steps and the owner for each action.
- Verification evidence includes row counts, a configuration diff, sample dashboard renders and a log of the SECRET_KEY and PREVIOUS_SECRET_KEY settings used.
- We document the retained source database, backup locations and retention period, and walk your platform and database team through the procedure.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, which can cover later Superset upgrades that touch the metadata schema.
- We can review PostgreSQL minor releases, backup restore tests and connection pooling changes on a schedule agreed in writing.
- Support scope, response expectations and fees are set out in the written agreement, so you can confirm them with us before the move starts.

