Load traces from files with magpie-server import, and back up and restore a store.
Import
magpie-server import loads traces from files into a store: a Magpie export, OTLP/JSON files of the OpenTelemetry Collector’s file exporter, or LangSmith runs.
Stop the server first, or import into a new folder: an import is a writer.
An OTLP/JSON file has one request per line (jq -c . trace.json makes one line of a request that is printed on many lines):
Formats: magpie (the lines of POST /v1/export and /v1/export/scores), otlp, langsmith. A file that ends in .gz is read as gzip; - is the standard input.
A bad line is skipped and counted; the first 10 are named in the summary. --strict stops at the first one.
An import is safe to run again: every span replaces the stored span with the same ids. There is no resume: a stopped import starts from the first line again.
The import writes in time order. So import old traces first, into an empty store, then go live.
--prices and --mask work as on the server: give the import the same files.
A store folder that no process has open is a whole store. Copy it, and a server opens the copy:
cp -R live live-copy
magpie-server --dir ./live-copy
curl -s localhost:4318/v1/count -d '{}'
{"count":9}
What is not tested
A copy of the folder while the server writes is not tested. Do not rely on it: use the export, or stop the server.
A disk snapshot of the whole volume (for example an EBS snapshot) is not tested either.
With --s3, the bucket is a copy that is at most about 10 s behind (the S3 guide).
A backup holds private data. Deletes and purges do not touch it: delete old backups by your own rule.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Magpie","description":"Magpie is a trace store for AI agents: full-text search over prompts and replies, whole-trace queries and token and cost sums, in one Rust engine. A library for Rust, Node.js and Python, or one server that takes OpenTelemetry.","colors":{"primary":"#8A5A00","light":"#FFE83A","dark":"#8A5A00"},"logo":{"light":"https://mintcdn.com/magpie-f30b9567/lfS8S2tPtzbDfpXA/logo/light.svg?fit=max\u0026auto=format\u0026n=lfS8S2tPtzbDfpXA\u0026q=85\u0026s=6974f4dc1ead619990c46e61fa4c1569","dark":"https://mintcdn.com/magpie-f30b9567/lfS8S2tPtzbDfpXA/logo/dark.svg?fit=max\u0026auto=format\u0026n=lfS8S2tPtzbDfpXA\u0026q=85\u0026s=157f6921ea9b76c531444e3f6a94842c","href":"https://magpiedb.com"},"favicon":"https://mintcdn.com/magpie-f30b9567/lfS8S2tPtzbDfpXA/favicon.svg?fit=max\u0026auto=format\u0026n=lfS8S2tPtzbDfpXA\u0026q=85\u0026s=30258f3a311559908d00d02444a3e371","background":{"color":{"dark":"#0B0B0A"}},"navbar":{"links":[{"href":"https://github.com/intojhanurag/magpie","type":"github"}],"primary":{"type":"button","label":"Quick start","href":"/quickstart"}},"footer":{"socials":{"github":"https://github.com/intojhanurag/magpie","website":"https://magpiedb.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":["Magpie is a trace store for AI agents, used as a library (crate `magpiedb`, npm `magpiedb`, PyPI `magpiedb`) or as `magpie-server`, which takes OpenTelemetry (OTLP over HTTP on 127.0.0.1:4318 and gRPC on 127.0.0.1:4317 by default).","Use only the commands, flags, routes and JSON shapes that these pages show. Do not guess a flag or a query field: if a page does not show it, say that the docs do not show it.","Packages and server binaries are not published yet: build from source, as the quick start shows. Check the status note on the introduction page before you suggest `cargo add`, `npm install` or `pip install`.","Only one process may write to a store folder at a time. For many apps, send traces to one `magpie-server`."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"magpie-f30b9567","hasAudioNarration":false,"actualSubdomain":"magpie-f30b9567","customDomains":[],"gitSource":{"type":"github","owner":"intojhanurag","repo":"magpie","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6b14f45b6b767715287f4264"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b14f76b3c71e4bc394dbb70","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Run in production","count":11},{"language":"default","tag":"Queries","count":8},{"language":"default","tag":"Server reference","count":7},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Libraries","count":3},{"language":"default","tag":"Benchmarks","count":1},{"language":"default","tag":"Send traces","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"operations/backup-import","slug":"/operations/backup-import","pageMetadata":{"title":"Import and backup","description":"Load traces from files with magpie-server import, and back up and restore a store.","href":"/operations/backup-import"},"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: \"Load traces from files with magpie-server import, and back up and restore a store.\"\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`,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(Heading,{level:`2`,id:`import`,children:`Import`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`magpie-server import`}),` loads traces from files into a store: a Magpie export, OTLP/JSON files of the OpenTelemetry Collector’s `,_jsx(_components.code,{children:`file`}),` exporter, or LangSmith runs.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Stop the server first`}),`, or import into a new folder: an import is a writer.`]})}),`\n`,_jsxs(_components.p,{children:[`An OTLP/JSON file has one request per line (`,_jsx(_components.code,{children:`jq -c . trace.json`}),` makes one line of a request that is printed on many lines):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` old-traces.json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`'EOF'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{\"resourceSpans\":[{\"resource\":{\"attributes\":[{\"key\":\"service.name\",\"value\":{\"stringValue\":\"support-bot\"}}]},\"scopeSpans\":[{\"spans\":[{\"traceId\":\"5b8efff798038103d269b633813fc60c\",\"spanId\":\"eee19b7ec3c1b174\",\"name\":\"chat gpt-4o\",\"startTimeUnixNano\":\"1764500000000000000\",\"endTimeUnixNano\":\"1764500002000000000\",\"attributes\":[{\"key\":\"gen_ai.operation.name\",\"value\":{\"stringValue\":\"chat\"}},{\"key\":\"gen_ai.prompt\",\"value\":{\"stringValue\":\"Where is my refund?\"}}]}]}]}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`EOF`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`magpie-server`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./imported`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --format`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` otlp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` old-traces.json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` 2>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /dev/null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{format, lines, spans, skippedLines, spansInStore, tracesInStore}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"otlp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"lines\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"spans\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"skippedLines\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"spansInStore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"tracesInStore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Formats: `,_jsx(_components.code,{children:`magpie`}),` (the lines of `,_jsx(_components.code,{children:`POST /v1/export`}),` and `,_jsx(_components.code,{children:`/v1/export/scores`}),`), `,_jsx(_components.code,{children:`otlp`}),`, `,_jsx(_components.code,{children:`langsmith`}),`. A file that ends in `,_jsx(_components.code,{children:`.gz`}),` is read as gzip; `,_jsx(_components.code,{children:`-`}),` is the standard input.`]}),`\n`,_jsxs(_components.li,{children:[`A bad line is skipped and counted; the first 10 are named in the summary. `,_jsx(_components.code,{children:`--strict`}),` stops at the first one.`]}),`\n`,_jsx(_components.li,{children:`An import is safe to run again: every span replaces the stored span with the same ids. There is no resume: a stopped import starts from the first line again.`}),`\n`,_jsx(_components.li,{children:`The import writes in time order. So import old traces first, into an empty store, then go live.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`--prices`}),` and `,_jsx(_components.code,{children:`--mask`}),` work as on the server: give the import the same files.`]}),`\n`,_jsxs(_components.li,{children:[`Memory (`,_jsx(_components.code,{children:`--memory-mb`}),`, default 1024), disk, and formats in full: `,_jsx(_components.a,{href:`/reference/server`,children:`Server reference, “Import old traces”`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`backup`,children:`Backup`}),`\n`,_jsx(_components.p,{children:`There is no backup command. Two ways work and were run here.`}),`\n`,_jsx(Heading,{level:`3`,id:`1-export-then-import`,children:`1. Export, then import`}),`\n`,_jsx(_components.p,{children:`The server keeps running. The export is the commit of the moment of the request.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`magpie-server`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./live`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REPO`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`/scripts/send-trace.sh\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://127.0.0.1:4318`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --count`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /dev/null`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`sleep`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localhost:4318/v1/export`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backup-spans.ndjson`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sN`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localhost:4318/v1/export/scores`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backup-scores.ndjson`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`wc`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -l`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backup-spans.ndjson`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`9`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`To restore, import both files into an empty folder:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`magpie-server`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./restored`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --format`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` magpie`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backup-spans.ndjson`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` backup-scores.ndjson`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` 2>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /dev/null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{spansInStore, tracesInStore}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"spansInStore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"tracesInStore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`2-stop-the-server-copy-the-folder`,children:`2. Stop the server, copy the folder`}),`\n`,_jsx(_components.p,{children:`A store folder that no process has open is a whole store. Copy it, and a server opens the copy:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cp`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -R`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` live`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` live-copy`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`magpie-server`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --dir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ./live-copy`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localhost:4318/v1/count`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`what-is-not-tested`,children:`What is not tested`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A copy of the folder `,_jsx(_components.strong,{children:`while the server writes`}),` is not tested. Do not rely on it: use the export, or stop the server.`]}),`\n`,_jsx(_components.li,{children:`A disk snapshot of the whole volume (for example an EBS snapshot) is not tested either.`}),`\n`,_jsxs(_components.li,{children:[`With `,_jsx(_components.code,{children:`--s3`}),`, the bucket is a copy that is at most about 10 s behind (`,_jsx(_components.a,{href:`/operations/s3`,children:`the S3 guide`}),`).`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`A backup holds private data. Deletes and purges do not touch it: delete old backups by your own rule.`})})]})}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":"Import and backup","description":"Load traces from files with magpie-server import, and back up and restore a store.","href":"/operations/backup-import"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Import","slug":"import","depth":2,"children":[]},{"title":"Backup","slug":"backup","depth":2,"children":[{"title":"1. Export, then import","slug":"1-export-then-import","depth":3,"children":[]},{"title":"2. Stop the server, copy the folder","slug":"2-stop-the-server-copy-the-folder","depth":3,"children":[]},{"title":"What is not tested","slug":"what-is-not-tested","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"magpie-f30b9567","siteName":"Magpie","title":"Import and backup - Magpie","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-06T05:43:40.395Z","originalFileLocation":"operations/backup-import.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=\"Load traces from files with magpie-server import, and back up and restore a store.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Magpie\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Import and backup - Magpie\">\u003cmeta data-mint-head property=\"og:description\" content=\"Load traces from files with magpie-server import, and back up and restore a store.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Magpie\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://magpie-f30b9567.mintlify.app/operations/backup-import\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://magpie-f30b9567.mintlify.site/_mintlify/api/og/v2?division=Run+in+production\u0026amp;title=Import+and+backup\u0026amp;description=Load+traces+from+files+with+magpie-server+import%2C+and+back+up+and+restore+a+store.\u0026amp;theme=c12fb36a245ba8a0a1e4be77\u0026amp;signature=88465d5d784876921c1fc24df662892b89dd96f21d26d48dccb24c317fd26895\">\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=\"Import and backup - Magpie\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Load traces from files with magpie-server import, and back up and restore a store.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://magpie-f30b9567.mintlify.site/_mintlify/api/og/v2?division=Run+in+production\u0026amp;title=Import+and+backup\u0026amp;description=Load+traces+from+files+with+magpie-server+import%2C+and+back+up+and+restore+a+store.\u0026amp;theme=c12fb36a245ba8a0a1e4be77\u0026amp;signature=88465d5d784876921c1fc24df662892b89dd96f21d26d48dccb24c317fd26895\">\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=\"/mintlify-assets/_mintlify/favicons/magpie-f30b9567/1JOp6MR2aIDJOeid/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Magpie\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8A5A00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://magpie-f30b9567.mintlify.app/operations/backup-import\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/operations/backup-import.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://magpie-f30b9567.mintlify.app/#organization\",\"name\":\"Magpie\",\"url\":\"https://magpie-f30b9567.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/magpie-f30b9567/lfS8S2tPtzbDfpXA/logo/light.svg?fit=max\u0026auto=format\u0026n=lfS8S2tPtzbDfpXA\u0026q=85\u0026s=6974f4dc1ead619990c46e61fa4c1569\"}},{\"@type\":\"WebSite\",\"@id\":\"https://magpie-f30b9567.mintlify.app#website\",\"name\":\"Magpie\",\"url\":\"https://magpie-f30b9567.mintlify.app\",\"publisher\":{\"@id\":\"https://magpie-f30b9567.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import#webpage\",\"url\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import\",\"name\":\"Import and backup\",\"description\":\"Load traces from files with magpie-server import, and back up and restore a store.\",\"dateModified\":\"2026-12-06T05:43:40.395Z\",\"isPartOf\":{\"@id\":\"https://magpie-f30b9567.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Run in production\",\"item\":\"https://magpie-f30b9567.mintlify.app/operations/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Import and backup\",\"item\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import#article\",\"headline\":\"Import and backup\",\"name\":\"Import and backup\",\"description\":\"Load traces from files with magpie-server import, and back up and restore a store.\",\"url\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import\",\"mainEntityOfPage\":{\"@id\":\"https://magpie-f30b9567.mintlify.app/operations/backup-import#webpage\"},\"dateModified\":\"2026-12-06T05:43:40.395Z\",\"publisher\":{\"@id\":\"https://magpie-f30b9567.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://magpie-f30b9567.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Magpie\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Magpie\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/operations/backup-import.md","siteName":"Magpie","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Magpie","sidebarTitle":"Introduction","icon":"feather","href":"/index"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/quickstart"},{"title":"Set up Magpie with a coding agent","sidebarTitle":"Agent setup","icon":"terminal","href":"/agent-setup"},{"title":"Library or server?","icon":"signs-post","href":"/library-or-server"},{"title":"Use these docs with AI tools","icon":"robot","href":"/ai-tools"}]},{"group":"Send traces","pages":[{"title":"Send traces with OpenTelemetry","sidebarTitle":"OpenTelemetry","href":"/guides/opentelemetry"}]},{"group":"Libraries","pages":[{"title":"Rust library","sidebarTitle":"Rust","href":"/libraries/rust"},{"title":"Node.js library","sidebarTitle":"Node.js","href":"/libraries/node"},{"title":"Python library","sidebarTitle":"Python","href":"/libraries/python"}]},{"group":"Queries","pages":[{"title":"Queries","href":"/queries/overview"},{"title":"Find text","href":"/queries/text-search"},{"title":"Filter spans","href":"/queries/filters"},{"title":"Questions about whole traces","href":"/queries/traces"},{"title":"Add up numbers","href":"/queries/sums"},{"title":"Sessions and scores","href":"/queries/sessions-scores"},{"title":"Read and export","href":"/queries/read-export"},{"title":"The same queries in the library","href":"/queries/library"}]},{"group":"Run in production","pages":[{"title":"Run Magpie for a company","sidebarTitle":"Overview","href":"/operations/overview"},{"title":"API keys and TLS","href":"/operations/keys-tls"},{"title":"Tenants: one store per customer","sidebarTitle":"Tenants","href":"/operations/tenants"},{"title":"Retention and deletes","href":"/operations/data-lifecycle"},{"title":"Masking private data","sidebarTitle":"Masking","description":"Replace private data in every span and score before it is stored, with --mask.","href":"/operations/masking"},{"title":"Import and backup","href":"/operations/backup-import"},{"title":"S3","description":"Keep a Magpie store in an S3 bucket, run read-only servers on it, and set up Amazon S3 the safe way.","href":"/operations/s3"},{"title":"Durability and upgrades","href":"/operations/durability-upgrades"},{"title":"Errors, memory and threads","href":"/operations/errors-memory"},{"title":"Security","href":"/security"},{"title":"Limits","href":"/limits"}]},{"group":"Server reference","pages":[{"title":"magpie-server","href":"/reference/server"},{"title":"HTTP API","href":"/reference/http-api"},{"title":"Tenants, API keys and TLS","href":"/reference/tenants-and-keys"},{"title":"S3 with the server","href":"/reference/server-s3"},{"title":"Viewer","href":"/reference/viewer"},{"title":"Import old traces","href":"/reference/import"},{"title":"Mapping, cost and masking","href":"/reference/mapping-cost-masking"}]},{"group":"Benchmarks","pages":[{"title":"Benchmarks","icon":"chart-simple","href":"/benchmarks"}]}]},"basePath":"","title":"Import and backup - Magpie","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}