Back up an installation, upgrade it safely, or clear a dedicated environment.
Back up Quivr before upgrading and keep the previous configuration and plugin pins available until you’ve checked the new release. Reset is for environments whose contents you intend to erase.
Prerequisites
Read the new release notes for compatibility, required backfills and any deferred migrations. Keep both releases, their configuration and their plugin images available. An in-place upgrade needs a supported starting version. For an unsupported version, bring up a fresh installation and import the original content.
Back up the installation
Take a coordinated backup of PostgreSQL, object storage, the search index and the configuration, including secrets. Back up Temporal persistence as part of the same recovery point. Protect the backup and test restoring it before starting the upgrade.For the single-machine bundle, stop all services with docker compose --profile demo stop before taking host snapshots. Save the four named volumes (PostgreSQL, SeaweedFS, Weaviate and model cache) and keep .env, compose.yaml and release.json together. For a SQLite-backed Temporal bundle, also snapshot its <project>-temporal-data volume if present. Only Temporal’s new PostgreSQL databases start fresh. The existing Quivr database stays on the persistent PostgreSQL volume. Restore backups under the original project and volume names.
Upgrade a Compose bundle
Schedule downtime and drain active work before upgrading the bundle. The installer stops the API, worker and demo in place. If you are moving from a bundle that used SQLite for Temporal, the PostgreSQL-backed version creates new Temporal databases.Verify the new bundle’s image digests. Use the new bundle’s installer with the path to the existing installation and the new release manifest. For example:
The installer keeps the existing project settings, recreates the migrator and starts the stack. From the installation directory, run docker compose --profile demo up -d if you use the demo.
Roll the API and workers
Use this sequence for a deployment that can run overlapping instances. A rolling upgrade requires version and plugin compatibility throughout the overlap.
Run the new migrator with QUIVR_CONFIG=/path/to/new-config.json quivr migrate, substituting the new deployment JSON path. It applies additive changes and prepares shared dependencies. If it times out on a database lock, let the conflicting work finish before retrying.
Start the new workers. Wait for readiness. If the release notes identify work the new workers cannot resume, let the previous workers finish it. Then send SIGTERM to the previous workers and wait for them to drain and exit.
Start the new API instances. Send traffic to each once its private /readyz returns HTTP 204, then drain the previous instances. A 204 can arrive while performance indexes are still building. If you need those indexes at handover, wait for X-Quivr-Index-Setup: ready before routing traffic.
Drain legacy ingestion before retiring workers
If the installation still has legacy Temporal work, keep a compatible worker serving both the live and bulk queues. This worker also polls quivr-content-v0. Keep it running until every active history on that legacy queue finishes. Before retiring the last compatible worker, also confirm that PostgreSQL has no rows with legacy_workflow = true in ingestion_outbox or ingestion_batches. Check the queue and tables on the old deployment before applying the contract migration that drops those columns. For supported starting versions, see Versions and compatibility.
Check it worked
Check the API and worker readiness probes, ingest a document, and confirm it appears in search. With the new deployment file selected in QUIVR_CONFIG, run quivr storage status to check the PostgreSQL schema. Use the index setup diagnostics if the schema or indexes are still pending.
Diagnose migration and index setup
migration_busy means another migrator held the lock. Let it finish before rerunning the new migrator.
Read X-Quivr-Index-Setup on the private /readyz response. ready means the process verified the expected indexes. Keep an API or worker running while setup is pending or retrying. The header reports index progress separately from HTTP readiness.
For index_setup_busy or index_setup_failed, check the structured setup logs. The live process retries and can repair matching invalid indexes. For index_definition_conflict, inspect the conflicting object in PostgreSQL and have the DBA rename it before retrying.
If the hot queue’s attempt primary key bloats, a DBA can run REINDEX INDEX CONCURRENTLY queue_document_attempts_pkey outside a transaction. Allow temporary disk space for the replacement index.
If a build repeatedly exceeds the 30-minute setup budget, drain and stop API and worker processes to pause automatic maintenance. In PostgreSQL, inspect the affected index’s indisvalid flag and pg_get_indexdef output. Drop a matching invalid index with DROP INDEX CONCURRENTLY outside a transaction. Leave a conflicting definition for the DBA to investigate.Recreate the matching index concurrently in a session with a longer statement timeout. For example, these are the definitions of two managed indexes:
CREATE INDEX CONCURRENTLY IF NOT EXISTS segments_by_segmentation ON segments (organization, segmentation_id);CREATE INDEX CONCURRENTLY IF NOT EXISTS records_by_current_version ON records (organization, corpus_id, current_version_id);
Restart the API and workers and check the readiness header again.
Keep the rollback window
If both versions support the data written so far, application rollback can use the previous image, configuration and pins while leaving the additive changes in place. Rebuilding into a newer index format, enabling features that older writers can’t support, or applying destructive migrations can close this window. Recovery after an incompatible change requires a forward fix or restoring the coordinated backup.If the release calls for quivr migrate --contract, review every deferred change and confirm that the current application works both before and after those changes. Drain and stop every previous API and worker and wait for their in-flight work to finish before applying the contracts. The command applies all pending contracts and closes the application rollback window.
Initialize document totals
Keep corpus_stats.bootstrap_enabled at its default false until every previous API and worker has drained and stopped. If the release calls for initializing totals, set it to true and restart the current processes. Keep an enabled process running until the document totals report complete: true. Once initialization starts, only writers that maintain these totals can safely run.
Initialize queue observations
After an upgrade that changes queue totals, keep a current API or worker running while it initializes those totals in resumable pages. During a mixed-version rollout, counts can lag behind previous writers until reconciliation catches up. The queue endpoint returns HTTP 503 for missing or stale counts. Wait for observations to recover before using them to scale workers.
Enable parallel imports
For an upgrade from before the parallel journal was introduced, first run a version that supports both modes on all replicas. Drain and retire every writer that only supports legacy mode. Check quivr journal status, then run quivr journal activate --previous-writers-retired and confirm it reports parallel: true. Every binary in the rollback window must understand parallel mode. Once parallel mode is active, rolling back to a binary from before it was introduced is unsafe.To return to legacy numbering, retire every writer that predates the two-mode release and run quivr journal legacy --writers-drained. A timeout leaves the previous mode active. Keep publication row and sequence changes under this command. Manual changes, including calling setval, can race with live writers. Use quivr journal status to confirm the result.For a logical restore to a new PostgreSQL cluster, stop every Quivr API and worker before restoring. Keep them stopped until quivr journal restored --writers-drained succeeds against the restored database. Clients with expired snapshot cursors then restart from the catalog. See the journal command reference.
Reset a dedicated installation
Reset deletes stored content, workflows and index data. Confirm the target and backup before proceeding.
Release bundle. From its directory, check the project name in .env and review the services with docker compose --profile demo ps -a. To discard that bundle’s data and model cache, run docker compose --profile demo down --volumes. Run python3 setup.py prepare before starting it again. If a previous SQLite-backed Temporal bundle left an old volume behind, verify it is no longer needed and remove that exact volume separately. For example, substitute the project name from .env in docker volume rm "<project>-temporal-data".
Repository Compose or Railway deployment. Start from the matching installation declaration and fill in the identifiers for your dedicated environment. For example, run python3 deploy/reset.py -f /path/to/installation.json from the checkout to preview. After reviewing the scope, repeat it with --confirm --deployment-name "Example evaluation", replacing the quoted name with the exact declared deployment name.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Quivr","description":"An open-source engine that turns continuous content streams into search and alerts.","colors":{"primary":"#5b3fd6","light":"#b29aff","dark":"#4b31be"},"api":{"playground":{"display":"interactive"}},"integrations":{"posthog":{"apiKey":"phc_pSFWFc94275asrYSX5PQffv7wE6vUsGDdUnBaDobgtMN","apiHost":"https://us.i.posthog.com","sessionRecording":false}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"thevibecompany","hasAudioNarration":false,"actualSubdomain":"thevibecompany","customDomains":["docs.quivr.thevibecompany.co"],"gitSource":{"type":"github","owner":"the-vibe-company","repo":"quivr","deployBranch":"main","contentDirectory":"docs-site","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0f1f79d2e0ecd950a22f2f","clientVersion":"0.0.4389","searchFilterCounts":[{"language":"default","tag":"Reference","count":122},{"language":"default","tag":"Endpoints","count":106},{"language":"default","tag":"Admin","count":29},{"language":"default","tag":"Plugins","count":18},{"language":"default","tag":"Connectors","count":15},{"language":"default","tag":"Corpora","count":13},{"language":"default","tag":"Build a plugin","count":12},{"language":"default","tag":"Operate","count":11},{"language":"default","tag":"Run Quivr","count":11},{"language":"default","tag":"Records","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"operate/upgrade","slug":"/operate/upgrade","pageMetadata":{"title":"Upgrade or reset Quivr","sidebarTitle":"Upgrade and reset","description":"Back up an installation, upgrade it safely, or clear a dedicated environment.","keywords":["upgrade","rollback","backup","reset"],"href":"/operate/upgrade"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Back up an installation, upgrade it safely, or clear a dedicated environment.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Back up Quivr before upgrading and keep the previous configuration and plugin pins available until you’ve checked the new release. Reset is for environments whose contents you intend to erase.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Read the new release notes for compatibility, required backfills and any deferred migrations. Keep both releases, their configuration and their plugin images available. An in-place upgrade needs a supported starting version. For an unsupported version, bring up a fresh installation and import the original content.`}),`\n`,_jsx(Heading,{level:`2`,id:`back-up-the-installation`,children:`Back up the installation`}),`\n`,_jsx(_components.p,{children:`Take a coordinated backup of PostgreSQL, object storage, the search index and the configuration, including secrets. Back up Temporal persistence as part of the same recovery point. Protect the backup and test restoring it before starting the upgrade.`}),`\n`,_jsxs(_components.p,{children:[`For the single-machine bundle, stop all services with `,_jsx(_components.code,{children:`docker compose --profile demo stop`}),` before taking host snapshots. Save the four named volumes (PostgreSQL, SeaweedFS, Weaviate and model cache) and keep `,_jsx(_components.code,{children:`.env`}),`, `,_jsx(_components.code,{children:`compose.yaml`}),` and `,_jsx(_components.code,{children:`release.json`}),` together. For a SQLite-backed Temporal bundle, also snapshot its `,_jsx(_components.code,{children:`\u003cproject>-temporal-data`}),` volume if present. Only Temporal’s new PostgreSQL databases start fresh. The existing Quivr database stays on the persistent PostgreSQL volume. Restore backups under the original project and volume names.`]}),`\n`,_jsx(Heading,{level:`2`,id:`upgrade-a-compose-bundle`,children:`Upgrade a Compose bundle`}),`\n`,_jsx(_components.p,{children:`Schedule downtime and drain active work before upgrading the bundle. The installer stops the API, worker and demo in place. If you are moving from a bundle that used SQLite for Temporal, the PostgreSQL-backed version creates new Temporal databases.`}),`\n`,_jsx(_components.p,{children:`Verify the new bundle’s image digests. Use the new bundle’s installer with the path to the existing installation and the new release manifest. For example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /path/to/new-bundle/setup.py`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` upgrade`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --directory`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /path/to/installation`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --release`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /path/to/new-bundle/release.json`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The installer keeps the existing project settings, recreates the migrator and starts the stack. From the installation directory, run `,_jsx(_components.code,{children:`docker compose --profile demo up -d`}),` if you use the demo.`]}),`\n`,_jsx(Heading,{level:`2`,id:`roll-the-api-and-workers`,children:`Roll the API and workers`}),`\n`,_jsx(_components.p,{children:`Use this sequence for a deployment that can run overlapping instances. A rolling upgrade requires version and plugin compatibility throughout the overlap.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Run the new migrator with `,_jsx(_components.code,{children:`QUIVR_CONFIG=/path/to/new-config.json quivr migrate`}),`, substituting the new deployment JSON path. It applies additive changes and prepares shared dependencies. If it times out on a database lock, let the conflicting work finish before retrying.`]}),`\n`,_jsx(_components.li,{children:`Start the new workers. Wait for readiness. If the release notes identify work the new workers cannot resume, let the previous workers finish it. Then send SIGTERM to the previous workers and wait for them to drain and exit.`}),`\n`,_jsxs(_components.li,{children:[`Start the new API instances. Send traffic to each once its private `,_jsx(_components.code,{children:`/readyz`}),` returns HTTP 204, then drain the previous instances. A 204 can arrive while performance indexes are still building. If you need those indexes at handover, wait for `,_jsx(_components.code,{children:`X-Quivr-Index-Setup: ready`}),` before routing traffic.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`drain-legacy-ingestion-before-retiring-workers`,children:`Drain legacy ingestion before retiring workers`}),`\n`,_jsxs(_components.p,{children:[`If the installation still has legacy Temporal work, keep a compatible worker serving both the `,_jsx(_components.code,{children:`live`}),` and `,_jsx(_components.code,{children:`bulk`}),` queues. This worker also polls `,_jsx(_components.code,{children:`quivr-content-v0`}),`. Keep it running until every active history on that legacy queue finishes. Before retiring the last compatible worker, also confirm that PostgreSQL has no rows with `,_jsx(_components.code,{children:`legacy_workflow = true`}),` in `,_jsx(_components.code,{children:`ingestion_outbox`}),` or `,_jsx(_components.code,{children:`ingestion_batches`}),`. Check the queue and tables on the old deployment before applying the contract migration that drops those columns. For supported starting versions, see `,_jsx(_components.a,{href:`/reference/compatibility#upgrading`,children:`Versions and compatibility`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`check-it-worked`,children:`Check it worked`}),`\n`,_jsxs(_components.p,{children:[`Check the API and worker `,_jsx(_components.a,{href:`/operate/deploy#check-that-it-is-ready`,children:`readiness probes`}),`, ingest a document, and confirm it appears in search. With the new deployment file selected in `,_jsx(_components.code,{children:`QUIVR_CONFIG`}),`, run `,_jsx(_components.code,{children:`quivr storage status`}),` to check the PostgreSQL schema. Use the `,_jsx(_components.a,{href:`#diagnose-migration-and-index-setup`,children:`index setup diagnostics`}),` if the schema or indexes are still pending.`]}),`\n`,_jsx(Heading,{level:`3`,id:`diagnose-migration-and-index-setup`,children:`Diagnose migration and index setup`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`migration_busy`}),` means another migrator held the lock. Let it finish before rerunning the new migrator.`]}),`\n`,_jsxs(_components.li,{children:[`Read `,_jsx(_components.code,{children:`X-Quivr-Index-Setup`}),` on the private `,_jsx(_components.code,{children:`/readyz`}),` response. `,_jsx(_components.code,{children:`ready`}),` means the process verified the expected indexes. Keep an API or worker running while setup is pending or retrying. The header reports index progress separately from HTTP readiness.`]}),`\n`,_jsxs(_components.li,{children:[`For `,_jsx(_components.code,{children:`index_setup_busy`}),` or `,_jsx(_components.code,{children:`index_setup_failed`}),`, check the structured setup logs. The live process retries and can repair matching invalid indexes. For `,_jsx(_components.code,{children:`index_definition_conflict`}),`, inspect the conflicting object in PostgreSQL and have the DBA rename it before retrying.`]}),`\n`,_jsxs(_components.li,{children:[`If the hot queue’s attempt primary key bloats, a DBA can run `,_jsx(_components.code,{children:`REINDEX INDEX CONCURRENTLY queue_document_attempts_pkey`}),` outside a transaction. Allow temporary disk space for the replacement index.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If a build repeatedly exceeds the 30-minute setup budget, drain and stop API and worker processes to pause automatic maintenance. In PostgreSQL, inspect the affected index’s `,_jsx(_components.code,{children:`indisvalid`}),` flag and `,_jsx(_components.code,{children:`pg_get_indexdef`}),` output. Drop a matching invalid index with `,_jsx(_components.code,{children:`DROP INDEX CONCURRENTLY`}),` outside a transaction. Leave a conflicting definition for the DBA to investigate.`]}),`\n`,_jsx(_components.p,{children:`Recreate the matching index concurrently in a session with a longer statement timeout. For example, these are the definitions of two managed indexes:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`CREATE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` INDEX`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CONCURRENTLY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` IF`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` NOT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` EXISTS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` segments_by_segmentation`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` segments (organization, segmentation_id);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`CREATE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` INDEX`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CONCURRENTLY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` IF`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` NOT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` EXISTS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` records_by_current_version`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` ON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` records (organization, corpus_id, current_version_id);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Restart the API and workers and check the readiness header again.`}),`\n`,_jsx(Heading,{level:`3`,id:`keep-the-rollback-window`,children:`Keep the rollback window`}),`\n`,_jsx(_components.p,{children:`If both versions support the data written so far, application rollback can use the previous image, configuration and pins while leaving the additive changes in place. Rebuilding into a newer index format, enabling features that older writers can’t support, or applying destructive migrations can close this window. Recovery after an incompatible change requires a forward fix or restoring the coordinated backup.`}),`\n`,_jsxs(_components.p,{children:[`If the release calls for `,_jsx(_components.code,{children:`quivr migrate --contract`}),`, review every deferred change and confirm that the current application works both before and after those changes. Drain and stop every previous API and worker and wait for their in-flight work to finish before applying the contracts. The command applies all pending contracts and closes the application rollback window.`]}),`\n`,_jsx(Heading,{level:`2`,id:`initialize-document-totals`,children:`Initialize document totals`}),`\n`,_jsxs(_components.p,{children:[`Keep `,_jsx(_components.code,{children:`corpus_stats.bootstrap_enabled`}),` at its default `,_jsx(_components.code,{children:`false`}),` until every previous API and worker has drained and stopped. If the release calls for initializing totals, set it to `,_jsx(_components.code,{children:`true`}),` and restart the current processes. Keep an enabled process running until the `,_jsx(_components.a,{href:`/guides/follow-changes#read-document-totals`,children:`document totals`}),` report `,_jsx(_components.code,{children:`complete: true`}),`. Once initialization starts, only writers that maintain these totals can safely run.`]}),`\n`,_jsx(Heading,{level:`2`,id:`initialize-queue-observations`,children:`Initialize queue observations`}),`\n`,_jsxs(_components.p,{children:[`After an upgrade that changes queue totals, keep a current API or worker running while it initializes those totals in resumable pages. During a mixed-version rollout, counts can lag behind previous writers until reconciliation catches up. The queue endpoint returns HTTP 503 for missing or stale counts. Wait for observations to recover before using them to `,_jsx(_components.a,{href:`/operate/deploy#scale-workers-on-backlog`,children:`scale workers`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`enable-parallel-imports`,children:`Enable parallel imports`}),`\n`,_jsxs(_components.p,{children:[`For an upgrade from before the parallel journal was introduced, first run a version that supports both modes on all replicas. Drain and retire every writer that only supports legacy mode. Check `,_jsx(_components.code,{children:`quivr journal status`}),`, then run `,_jsx(_components.code,{children:`quivr journal activate --previous-writers-retired`}),` and confirm it reports `,_jsx(_components.code,{children:`parallel: true`}),`. Every binary in the rollback window must understand parallel mode. Once parallel mode is active, rolling back to a binary from before it was introduced is unsafe.`]}),`\n`,_jsxs(_components.p,{children:[`To return to legacy numbering, retire every writer that predates the two-mode release and run `,_jsx(_components.code,{children:`quivr journal legacy --writers-drained`}),`. A timeout leaves the previous mode active. Keep publication row and sequence changes under this command. Manual changes, including calling `,_jsx(_components.code,{children:`setval`}),`, can race with live writers. Use `,_jsx(_components.code,{children:`quivr journal status`}),` to confirm the result.`]}),`\n`,_jsxs(_components.p,{children:[`For a logical restore to a new PostgreSQL cluster, stop every Quivr API and worker before restoring. Keep them stopped until `,_jsx(_components.code,{children:`quivr journal restored --writers-drained`}),` succeeds against the restored database. Clients with expired snapshot cursors then restart from the catalog. See the `,_jsx(_components.a,{href:`/reference/cli#quivr-journal`,children:`journal command reference`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reset-a-dedicated-installation`,children:`Reset a dedicated installation`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Reset deletes stored content, workflows and index data. Confirm the target and backup before proceeding.`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Release bundle.`}),` From its directory, check the project name in `,_jsx(_components.code,{children:`.env`}),` and review the services with `,_jsx(_components.code,{children:`docker compose --profile demo ps -a`}),`. To discard that bundle’s data and model cache, run `,_jsx(_components.code,{children:`docker compose --profile demo down --volumes`}),`. Run `,_jsx(_components.code,{children:`python3 setup.py prepare`}),` before starting it again. If a previous SQLite-backed Temporal bundle left an old volume behind, verify it is no longer needed and remove that exact volume separately. For example, substitute the project name from `,_jsx(_components.code,{children:`.env`}),` in `,_jsx(_components.code,{children:`docker volume rm \"\u003cproject>-temporal-data\"`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Repository Compose or Railway deployment.`}),` Start from the matching `,_jsx(_components.a,{href:`https://github.com/The-Vibe-Company/quivr/tree/main/deploy/examples`,children:`installation declaration`}),` and fill in the identifiers for your dedicated environment. For example, run `,_jsx(_components.code,{children:`python3 deploy/reset.py -f /path/to/installation.json`}),` from the checkout to preview. After reviewing the scope, repeat it with `,_jsx(_components.code,{children:`--confirm --deployment-name \"Example evaluation\"`}),`, replacing the quoted name with the exact declared deployment name.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next`,children:`Next`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/operate/install`,children:`Install Quivr on one machine`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/operate/manage-plugins`,children:`Upgrade or switch a plugin`}),`.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upgrade or reset Quivr","sidebarTitle":"Upgrade and reset","description":"Back up an installation, upgrade it safely, or clear a dedicated environment.","keywords":["upgrade","rollback","backup","reset"],"href":"/operate/upgrade"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Back up the installation","slug":"back-up-the-installation","depth":2,"children":[]},{"title":"Upgrade a Compose bundle","slug":"upgrade-a-compose-bundle","depth":2,"children":[]},{"title":"Roll the API and workers","slug":"roll-the-api-and-workers","depth":2,"children":[{"title":"Drain legacy ingestion before retiring workers","slug":"drain-legacy-ingestion-before-retiring-workers","depth":3,"children":[]}]},{"title":"Check it worked","slug":"check-it-worked","depth":2,"children":[{"title":"Diagnose migration and index setup","slug":"diagnose-migration-and-index-setup","depth":3,"children":[]},{"title":"Keep the rollback window","slug":"keep-the-rollback-window","depth":3,"children":[]}]},{"title":"Initialize document totals","slug":"initialize-document-totals","depth":2,"children":[]},{"title":"Initialize queue observations","slug":"initialize-queue-observations","depth":2,"children":[]},{"title":"Enable parallel imports","slug":"enable-parallel-imports","depth":2,"children":[]},{"title":"Reset a dedicated installation","slug":"reset-a-dedicated-installation","depth":2,"children":[]},{"title":"Next","slug":"next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"thevibecompany","siteName":"Quivr","title":"Upgrade or reset Quivr - Quivr","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-01T19:26:57.597Z","originalFileLocation":"operate/upgrade.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Back up an installation, upgrade it safely, or clear a dedicated environment.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Quivr\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/thevibecompany/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/thevibecompany/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/thevibecompany/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/thevibecompany/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upgrade or reset Quivr - Quivr\">\u003cmeta data-mint-head property=\"og:description\" content=\"Back up an installation, upgrade it safely, or clear a dedicated environment.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Quivr\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.quivr.thevibecompany.co/operate/upgrade\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://thevibecompany.mintlify.site/_mintlify/api/og/v2?division=Run+Quivr\u0026amp;title=Upgrade+or+reset+Quivr\u0026amp;description=Back+up+an+installation%2C+upgrade+it+safely%2C+or+clear+a+dedicated+environment.\u0026amp;theme=023e5d222c667e5b3829d1ff\u0026amp;signature=bf7088531c472d18e9c874a00aaa64cdb4fb62261aeb95d0e2c3133c50005bb0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upgrade or reset Quivr - Quivr\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Back up an installation, upgrade it safely, or clear a dedicated environment.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://thevibecompany.mintlify.site/_mintlify/api/og/v2?division=Run+Quivr\u0026amp;title=Upgrade+or+reset+Quivr\u0026amp;description=Back+up+an+installation%2C+upgrade+it+safely%2C+or+clear+a+dedicated+environment.\u0026amp;theme=023e5d222c667e5b3829d1ff\u0026amp;signature=bf7088531c472d18e9c874a00aaa64cdb4fb62261aeb95d0e2c3133c50005bb0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/thevibecompany/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Quivr\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5b3fd6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.quivr.thevibecompany.co/operate/upgrade\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/operate/upgrade.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.quivr.thevibecompany.co/#organization\",\"name\":\"Quivr\",\"url\":\"https://docs.quivr.thevibecompany.co\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.quivr.thevibecompany.co#website\",\"name\":\"Quivr\",\"url\":\"https://docs.quivr.thevibecompany.co\",\"publisher\":{\"@id\":\"https://docs.quivr.thevibecompany.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.quivr.thevibecompany.co/operate/upgrade#webpage\",\"url\":\"https://docs.quivr.thevibecompany.co/operate/upgrade\",\"name\":\"Upgrade or reset Quivr\",\"description\":\"Back up an installation, upgrade it safely, or clear a dedicated environment.\",\"dateModified\":\"2026-12-01T19:26:57.597Z\",\"isPartOf\":{\"@id\":\"https://docs.quivr.thevibecompany.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.quivr.thevibecompany.co/operate/upgrade#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.quivr.thevibecompany.co/operate/upgrade#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Run Quivr\",\"item\":\"https://docs.quivr.thevibecompany.co/operate/install\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upgrade or reset Quivr\",\"item\":\"https://docs.quivr.thevibecompany.co/operate/upgrade\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.quivr.thevibecompany.co/operate/upgrade#article\",\"headline\":\"Upgrade or reset Quivr\",\"name\":\"Upgrade or reset Quivr\",\"description\":\"Back up an installation, upgrade it safely, or clear a dedicated environment.\",\"url\":\"https://docs.quivr.thevibecompany.co/operate/upgrade\",\"mainEntityOfPage\":{\"@id\":\"https://docs.quivr.thevibecompany.co/operate/upgrade#webpage\"},\"dateModified\":\"2026-12-01T19:26:57.597Z\",\"keywords\":\"upgrade, rollback, backup, reset\",\"publisher\":{\"@id\":\"https://docs.quivr.thevibecompany.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.quivr.thevibecompany.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Quivr\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Quivr\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/operate/upgrade.md","siteName":"Quivr","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":""}]},{"tab":"Get started","pages":[{"title":"Get started","href":"/get-started/launch-quivr"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/add-content"}]},{"tab":"Plugins","pages":[{"title":"Plugins","href":"/plugins"}]},{"tab":"Operate","groups":[{"group":"Run Quivr","pages":[{"title":"Install Quivr on one machine","sidebarTitle":"Install on one machine","href":"/operate/install"},{"title":"Deploy Quivr in production","sidebarTitle":"Deploy and configure","href":"/operate/deploy"},{"title":"Secure a Quivr deployment","sidebarTitle":"Security and TLS","description":"Verify release images, restrict operator access, and configure TLS.","href":"/operate/security"},{"title":"Upgrade or reset Quivr","sidebarTitle":"Upgrade and reset","href":"/operate/upgrade"},{"title":"Manage plugins","description":"Enable, upgrade, disable and roll back plugins in a running Quivr deployment.","href":"/operate/manage-plugins"},{"title":"Search profiles","href":"/operate/search-profiles"},{"title":"Vector model","href":"/operate/vector-model"},{"title":"Scale Quivr","href":"/operate/scale"},{"title":"Measure search","href":"/operate/measure-search"},{"title":"Troubleshoot Quivr","href":"/operate/troubleshoot"},{"title":"Receive and secure pushes","href":"/operate/receive-pushes"}]}]},{"tab":"Build a plugin","pages":[{"title":"Build a plugin","href":"/build/overview"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/configuration"}]}]},"basePath":"","title":"Upgrade or reset Quivr - Quivr","deploymentId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","buildId":"dpl_4DWa5VHHws8GyZotTfaG5njNqY1w","dynamics":[],"chunks":[]}