How to export your data from ClickHouse Cloud

A practical guide to the documented export paths from ClickHouse Cloud, what each one preserves, where egress charges apply and how to verify a complete copy before your contract ends.

On this page

How to export your data from ClickHouse Cloud without losing schemas or rows

If a renewal, a pricing change or a residency rule means your data has to leave ClickHouse Cloud, three documented paths exist: remoteSecure pulls into a server you run, INSERT INTO FUNCTION s3 writes Parquet files to a bucket you control, and native BACKUP writes a restorable copy to storage you choose. Each one preserves different things, so pick the path by what you need on the other side, not by which one is fastest to start. Most of the work is moving rows, but a complete exit also needs the schemas, users, roles, settings and materialized views that define how those rows are read and written, and none of the three paths carries all of them automatically.

Before you run anything, confirm three points with your team and with ClickHouse documentation for your version. First, list every table that uses the SharedMergeTree engine, because the target must be recreated with ReplicatedMergeTree and the export path must not assume identical DDL. Second, record row counts and a checksum per table so you can prove completeness after the copy. Third, check which destinations and egress routes your contract and network policy allow, since data leaving the cloud region is the cost and compliance line you will be asked about. Ask your ClickHouse account contact to state in writing how egress is billed for your region and tier before you size the transfer.

Use the Parquet path when you want an open, engine-neutral copy in object storage that Spark, Trino or another ClickHouse cluster can read later, since Parquet files carry data but not your users or view definitions. Use remoteSecure when the target is a live ClickHouse server and you need to copy rows directly with less intermediate storage. Use BACKUP when you need a restorable image of tables and databases, and run a restore test on a spare cluster as the documentation recommends, because an untested backup often fails when it is needed. Document which artifact holds each object type, so a missing user or view is found during rehearsal rather than after the cutover.

Which ClickHouse Cloud data you can export and by which method

This table maps each type of ClickHouse Cloud data to the export method that moves it, the output format and the scope the documentation describes. Read the last column to see what must be recreated or confirmed separately. The main takeaway is that data movement and object definitions travel by different paths, so schemas, users and materialized views need their own plan.

Data or objectExport methodOutput and documented scopePreserved or needed separately
Table rows over a networkremoteSecure into your own serverRows copied over a secure connection into a table you create on the targetTarget table must exist first; schema is not copied
Table rows as filesINSERT INTO FUNCTION s3Parquet files written to an S3 bucket you controlColumn types are carried in the files; table DDL is not
Full or incremental backupsBACKUP to S3-compatible storageArchive of tables, partitions or databases; incremental backups are supportedConfirm the restore path and version compatibility in the backup docs
Table schemasBACKUP archiveTable definitions are expected to be part of a backup restoreNot included in remoteSecure or Parquet exports; recreate and verify
Users and rolesNone of the three methods copies them as dataAccess entities are managed through access controlRecreate manually or confirm backup scope in the access rights docs
Materialized viewsExport the target table data, not the view definitionTarget table rows move with the methods aboveRecreate the view definition on the target and confirm it is populated
Egress chargesApplies to data leaving ClickHouse Cloud by any methodDepends on cloud provider and region of the serviceConfirm the rates in your own cloud billing before exporting

What does not export directly and how teams work around it

A data export moves rows and table files, but several kinds of ClickHouse Cloud state sit outside that path. Each item below needs its own workaround, and each one should be verified against ClickHouse documentation and a test restore before cutover.

User credentials and password hashes

Users, roles and their password or authentication settings are access-control objects, not table data, so a data export does not bring them along. Teams usually recreate accounts on the self-managed cluster, or export access-control definitions and review them before reuse, and reset credentials for every human and service account. Confirm which authentication methods carry over in your version and which secrets must be re-issued, because hashes may not be portable across setups.

Access control docs

Grants and role assignments

Privileges granted to users and roles determine who can read which databases and tables, and they are stored separately from the data. A migrated cluster that has the right tables but no grants will either reject clients or, worse, open access wider than intended. Recreate grants from the source definitions, then test each client identity with the queries it runs in production, including the denied cases.

Row policies

Row policies filter which rows a given user sees, so they are part of data access rather than the data itself. Missing row policies on the target cluster expose rows that the source hid from the same user. Recreate each policy from its DDL, attach it to the same roles, and run a query as a restricted user on both clusters to compare row counts.

Materialized view definitions

A materialized view stores its query and its target table, and the view's trigger logic lives in the schema. Copying the target table's rows does not recreate the view, so new inserts on the self-managed cluster would not populate it. Recreate the view DDL after the base tables exist, and confirm that the target table engine matches your replicated layout.

Dictionaries and external sources

Dictionaries hold lookup data loaded from a source such as a table, file or external database, and their definitions reference connection details that must change on the new network. Recreate the dictionary definitions, point them at reachable sources, and check that refresh intervals and credentials work from the self-managed hosts. Lookups that return empty results after cutover often point to a dictionary that never loaded.

In-flight and recent inserts

Data written during the copy window is not in the snapshot, so the target lags the source by however long the copy ran. Teams usually replay recent inserts from the source application or from their own ingestion queue, then compare counts and checksums for the overlap period. Decide the cutover point in advance, freeze or dual-write during the final catch-up, and confirm the replay logic handles duplicates before switching clients.

Choosing between remoteSecure, S3 Parquet and native backups

The remoteSecure table function lets a ClickHouse server you operate read from a ClickHouse Cloud service over a TLS-encrypted native connection. You run an INSERT INTO ... SELECT on your side, so your server pulls the rows and writes them into tables you define. This path suits moving whole tables or partitions into a self-managed cluster, and it is the usual base for a later move to self-managed ClickHouse.

  • What it preserves: Row data and the column types you declare on the target. Schemas, users, grants, materialized views and settings are not copied automatically, so you recreate them on the target.
  • Who runs it: Your team, from your own server, with credentials for the source service and a network path to it.
  • Where the bytes travel: From the ClickHouse Cloud service to your server, over the network path you configure, and then stay on your own disks.
  • What drives egress: Volume pulled, and whether the source and target sit in the same cloud region. Cross-region or internet transfer is billed by the cloud provider and possibly by ClickHouse Cloud, so ask both for the rates that apply to your route.
  • Recent inserts: Data written during the copy needs a replay step, so plan a cutover window.

Before you rely on this path, confirm the source service allows the connection you intend to use and measure the transfer on a representative table.

The export sequence from inventory to a verified copy

This sequence moves data out of ClickHouse Cloud in an order that keeps a verified, restorable copy in your own storage before anything is switched over. Each step ends with a check you can record, so the cutover rests on evidence rather than on the export job finishing.

  1. Inventory schemas, users and access rules

    Before moving any rows, list every database, table, materialized view, dictionary, user, role and grant in the ClickHouse Cloud service. Export the DDL with SHOW CREATE TABLE and record the access rules from the access control documentation, so you know what must be recreated on the target. The step is done when you have a complete file of object definitions and a written list of the users and roles that depend on them, reviewed by the data owner for each database.

  2. Size the data and estimate egress

    Query system tables such as system.parts to measure compressed size per table and partition, and note which tables change during the export window. Use those figures with your cloud bill's data transfer rates to estimate egress before you start, and confirm with ClickHouse Inc. or your account contact how egress is billed for your plan and cloud region. The step is done when you have a per-table size sheet and a written egress estimate that the budget owner has approved.

  3. Provision the target bucket or server

    Create the destination in the same cloud region as the ClickHouse Cloud service, either an S3-compatible bucket for Parquet files or a self-managed ClickHouse server for direct pulls. Apply encryption at rest, restrict access to the export role, and enable object versioning or retention if your policy requires it. The step is done when a test object written from the export role can be read back and no other identity can write to the bucket or server.

  4. Run exports one table at a time

    Export each table with INSERT INTO FUNCTION s3 for Parquet files, or copy directly with remoteSecure into a self-managed server, and keep a log of the start time, the query and the destination path for every table. Export large tables by partition where possible so a failed run can be repeated without restarting everything. The step is done when every table in the inventory has a completed output file or load, with the export log saved alongside the data.

  5. Record row counts and checksums

    For each table, record the row count in ClickHouse Cloud and in the copy, then compare them and store a checksum of the exported files or a hash of an ordered sample of rows. Investigate any mismatch before moving on, and note writes that arrived during the export window so they can be replayed. The step is done when every table has a matching row count and a stored checksum, and the discrepancies are either zero or explained in the log.

  6. Test restore on a spare cluster

    Restore the exported data, including the schema recreated from the inventory, into a spare ClickHouse cluster that is separate from production. Use RESTORE from a native backup where you took one, or load the Parquet files into the recreated tables, then rerun the row count and checksum comparisons and run a set of representative queries. The ClickHouse backup documentation warns that a backup never test-restored will probably not restore properly when needed and recommends regular restore tests on spare clusters, so treat this run as part of the export, not an optional extra. The step is done when the restored copy matches the source on counts, checksums and query results, and the results are documented.

  7. Cut over and keep the source for a rollback window

    Stop or redirect writes to ClickHouse Cloud, replay the inserts that arrived after the export snapshot, and repeat the count and checksum checks on the tables that changed. Point clients at the new endpoint and confirm users and grants work as recorded in the inventory. Keep the ClickHouse Cloud service intact until the new environment has run under real load and a fresh backup has been restored successfully. The step is done when the application owners sign off on the new endpoint and the decommissioning date is set in writing.

How the export paths connect ClickHouse Cloud to your environment

The diagram starts at the ClickHouse Cloud service inside the vendor account and shows three routes out: a pull into a self-managed ClickHouse server over remoteSecure, a Parquet write through INSERT INTO FUNCTION s3 into your bucket, and native BACKUP to S3-compatible storage that feeds a spare restore cluster. The dashed boundary marks where data leaves the vendor account and crosses into yours, which is where egress charges and access controls apply. Before you choose a path, confirm which schema objects, users and materialized views each route preserves, and test a restore rather than assuming the backup will work.

Three export paths crossing the vendor and customer trust boundary, with the egress point labeled.

How long a ClickHouse Cloud export takes and what it costs

What drives the cost of exporting data from ClickHouse Cloud?

The main drivers are the volume of data moved, whether the data crosses regions or clouds, and how many tables and materialized views need to be recreated. Egress charges depend on where the data leaves ClickHouse Cloud and where it lands, so an export within one cloud and region costs differently from one that crosses providers. Compute time for the export job, the storage you write to, and the engineering hours to reconcile schemas all add to the total. Ask for the egress rate for your specific cloud, region and destination in writing, and ask the vendor to confirm how export traffic is metered on your plan before you commit to a path.

How long does an export from ClickHouse Cloud usually take?

Duration depends mainly on data volume, network throughput between source and destination, the number of tables, and how many inserts must be replayed to catch up after the copy starts. No duration is fixed by the product, so the reliable way to plan is a test export of one representative table at full size. Measure the throughput, multiply it out to the full dataset, and add time for schema recreation, verification and a final cutover window. Ask any provider for a written timeline based on your measured volume rather than a generic estimate.

Can a team export ClickHouse Cloud data without outside help?

Yes, a team with ClickHouse operations experience can do it alone, provided it has the time and the skills to handle schema recreation, replication settings and verification. The harder parts are usually not the copy itself but ensuring materialized views, users, grants and settings are rebuilt correctly and that recent inserts are not lost during cutover. Teams without those skills often underestimate the reconciliation work. Compare the internal effort, including the people who will be on call during the switch, against a fixed-scope engagement with a written deliverable list.

What access and resources does an export need from my team?

The work typically needs read credentials on the ClickHouse Cloud service, a user with permission to inspect schemas, users and grants, and write access to the destination bucket or server. If you use the S3 path, the destination bucket needs an access policy that lets the export write Parquet files, and the network path must allow the traffic. A spare cluster is strongly advisable for test loads and restore rehearsals, so production is not touched while the team validates the copy. Confirm each of these items with your security team before the work starts.

How do you verify that an export is complete and correct?

Verification compares row counts, checksums or aggregates per table and partition between the source and the copy, and checks that schemas, materialized views, users and settings match what was agreed. ClickHouse's backup documentation warns that a backup never test-restored will probably not restore properly when needed, and recommends regular restore tests on spare clusters, so treat a successful copy as unproven until a restore or query comparison passes. Ask for the verification method, the acceptance criteria and the sign-off steps in the written scope.

Do I need a consultant to export data from ClickHouse Cloud?

A consultant is not required, but one is useful when volume is large, the schema is complex, or the cutover window is tight. A fixed-scope engagement can cover planning, a test export, the production copy, verification and documentation, with deliverables agreed in writing before work starts. DeployOpen plans, implements, documents and supports self-hosted open-source platforms in the client's own infrastructure, and the engagement is quoted from that written scope. Ask any provider to itemize which tasks are included and which remain with your team.

Which export method has the lowest effort for most teams?

Effort depends on what must be preserved. The remoteSecure pull is direct but needs network reachability and credentials between the two servers, the S3 Parquet export writes portable files that any engine can read but does not carry schemas, users or materialized views, and native backups preserve more structure but restore only into a compatible ClickHouse version. Choose the path after listing what must survive the move, then confirm with a test that each object type arrives as expected. Ask the vendor which object types each method preserves on your version.

What to plan before the ClickHouse Cloud contract ends

The export itself is the easy part. The risk sits in the dates around it: when notice is due, when billing stops, and whether you can still read your data while you verify it. The cards below cover what to confirm in the commercial agreement and how to sequence the export so the final cutover has no surprises.

Confirm notice and billing dates

Ask ClickHouse Inc or your reseller for the exact notice period, the renewal or termination date, and the day billing stops for compute and storage. Check whether storage is billed after compute is suspended, and whether backups kept in the service continue to accrue charges. Get these dates in writing before you set the export schedule, because they determine how much time you have for a dry run and a fallback.

Migration guide

Run a dry-run export early

Before the final cutover, export one representative database to your target and time the copy. Include the largest table, a table with materialized views, and a table that receives continuous inserts. The dry run shows whether the data arrives complete, how long a full copy takes at your network speed, and which schema changes you must make in the target, such as recreating ReplicatedMergeTree tables in place of SharedMergeTree.

Choose the target version line

Pick the self-managed ClickHouse version before you build the target, not after. The security policy lists which release lines still receive security updates. Use a supported line, and prefer a stable release for most production use or an LTS line if your change process favors slower upgrades. Read the changelog for the chosen version, since minor backward-incompatible changes can occur, and confirm the version you run matches the one you tested in the dry run.

Security policy

Keep a read-only window

Plan a period where the source cluster accepts reads but no writes, so the final copy compares against a fixed dataset. Confirm with your vendor whether you can set users or tables to read-only without a support ticket, and how that interacts with your applications. Replay any inserts that landed after the last copy, then compare row counts and checksums per table before you switch writers to the new cluster.

Retain exported copies and backups

Decide how long you keep the exported Parquet files in your bucket and any native backups taken before shutdown. Ask the vendor whether it deletes data after the contract ends and on what schedule, and get that answer in writing. Keep at least one backup that you have restored successfully on a spare cluster, since an untested backup may not restore when you need it. Record the retention owner and the deletion date in your data governance register.

Backup docs

Which ClickHouse version to target when you rebuild the data

Pick the target version before you create any schema on the new server. The ClickHouse security policy lists 26.9, 26.8, 26.7 and 26.3 as the lines that receive security updates, and every other version is unsupported. Choose one of those lines, not an older build copied from a Stack Overflow answer or a container image someone pinned years ago. The latest stable tag on the ClickHouse releases page is v26.9.20.23-stable, and the LTS lines v26.8.29.10-lts and v26.3.53.4-lts were published on October 16, 2026. Confirm these tags on the day you install, because point releases keep arriving.

For most production clusters, the stable line is the right default, and the production FAQ says stable releases ship roughly monthly with the three latest receiving backports. LTS releases ship twice a year and are supported for one year, which suits teams that want fewer upgrades and can wait for a slower release train. Whichever line you choose, read the changelog for every version between your target and the release you will eventually run, because the FAQ warns that minor backward-incompatible changes can occur. Check settings defaults, changed function behavior and anything that affects the CREATE TABLE statements you plan to replay from the source.

Before you copy a single table, install the chosen version in a pre-production environment with a representative sample of the migrated data and the queries your dashboards and jobs run. Compare row counts, aggregates and query latency against ClickHouse Cloud, and record any query that returns different results or fails. Keep that test cluster after go-live, since it is the place to rehearse your next upgrade. Ask your DeployOpen or internal team to confirm which line your compliance owner has approved, and document the version in your change record so auditors can trace what ran on the self-managed servers.

How DeployOpen works on this

DeployOpen plans, implements, documents and supports self-hosted open-source platforms in your own cloud accounts, data centers or air-gapped networks. For an export from ClickHouse Cloud, that means agreeing the scope in writing, building the copy path into infrastructure you control, and handing over a tested result your team can run.

How we scope

  • Inventory the databases, tables, materialized views, users and settings that must leave ClickHouse Cloud.
  • Agree which export paths apply, such as remoteSecure, Parquet files in your bucket, or native backups.
  • Write down the target environment, data volumes, cutover window and acceptance tests before any work starts.

How we build

  • Set up the target ClickHouse server or object storage bucket in your own cloud account or data center.
  • Configure the export jobs, credentials and network paths so data moves without exposing secrets.
  • Test copies against representative data and queries, then check row counts and schema matches.

How we hand over

  • Deliver runbooks covering each export step, rollback steps and the restore test procedure.
  • Document schemas, user and access configuration, backup settings and the egress costs you should expect.
  • Walk your platform, security and compliance teams through the evidence and the open items before sign-off.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the fixed-scope engagement ends.
  • Plan post-export backup schedules and periodic restore tests on a spare cluster.
  • Confirm version support and upgrade paths with you against the ClickHouse release policy at the time of delivery.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.