Files
greptimedb/cli/export_v2/index.html
T

30 lines
5.7 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Export V2 module."><title>cli::export_v2 - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="cli" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.1 (31fca3adb 2026-06-26)" data-channel="1.96.1" data-search-js="search-b5634cc7.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5013f961.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module export_v2</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../cli/index.html">cli</a><span class="version">1.3.0-alpha.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module export_<wbr>v2</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate cli</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">cli</a></div><h1>Module <span>export_<wbr>v2</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/cli/data/export_v2.rs.html#15-61">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Export V2 module.</p>
<p>This module provides the V2 implementation of database export functionality,
featuring:</p>
<ul>
<li>JSON-based schema export (version-agnostic)</li>
<li>Manifest-based snapshot management</li>
<li>Support for multiple storage backends (S3, OSS, GCS, Azure Blob, local FS)</li>
<li>Resume capability for interrupted exports</li>
</ul>
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2><div class="example-wrap"><pre class="language-bash"><code># Export schema only
greptime cli data export-v2 create \
--addr 127.0.0.1:4000 \
--to file:///tmp/snapshot \
--schema-only
# Export with time range
greptime cli data export-v2 create \
--addr 127.0.0.1:4000 \
--to s3://bucket/snapshots/prod-20250101 \
--start-time 2025-01-01T00:00:00Z \
--end-time 2025-01-31T23:59:59Z</code></pre></div>
<p><code>--experimental-metric-export</code> enables shared Metric physical scans for Parquet.
Enable <code>experimental_metric_export = true</code> on the frontend or standalone server
and use an endpoint whose frontends all support and enable this option.
The command checks the server capability before modifying the snapshot.
Each snapshot path belongs to one export task. Resume requires stable source
schemas/data and confirmation that the previous export and storage writes ended;
an HTTP timeout does not establish that. Only unfinished chunks are cleaned and
rerun. Completed chunks and the V2 snapshot/import format remain unchanged.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="error/index.html" title="mod cli::export_v2::error">error</a></dt><dt><a class="mod" href="extractor/index.html" title="mod cli::export_v2::extractor">extractor</a></dt><dd>Schema extraction from information_schema.</dd><dt><a class="mod" href="manifest/index.html" title="mod cli::export_v2::manifest">manifest</a></dt><dd>Manifest data structures for Export/Import V2.</dd><dt><a class="mod" href="schema/index.html" title="mod cli::export_v2::schema">schema</a></dt><dd>Minimal schema index structures for Export/Import V2.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.ExportV2Command.html" title="enum cli::export_v2::ExportV2Command">Export<wbr>V2Command</a></dt><dd>Export V2 commands.</dd></dl></section></div></main></body></html>