Skip to main content

ytclone

Copy static tables, files, YSON documents, and directories between YTsaurus and S3, preserving schemas and portable attributes. Repeat a command to skip completed, unchanged nodes and retry unfinished copies.

Restoring from S3 requires an archive created by ytclone.

Installation

Install from PyPI in your Python virtual environment:

pip install ytclone

Requires CPython 3.10+ on Linux x86_64 with glibc or macOS ARM64 (Apple Silicon). Other platforms are currently unsupported because the required ytsaurus-yson dependency has no wheels for them.

Standalone archives include both commands and need no installed Python or Docker. See standalone downloads for Linux x86_64 and macOS ARM64.

Docker images include both commands and use the same version numbers as PyPI. See running with Docker for commands (linux/amd64 only).

Quick start

Configure access to YTsaurus and S3:

export YT_PROXY="https://yt.example.com"
export YT_TOKEN="..."
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_DEFAULT_REGION="us-east-1"

The S3 bucket must already exist. For an S3-compatible service, also set S3_ENDPOINT to its URL. Use AWS_SESSION_TOKEN for temporary credentials.

Copy to S3:

ytclone //home/analytics/events s3://my-bucket/export --log-file export.log

The full YT path is appended to the S3 prefix: this command stores events at s3://my-bucket/export/home/analytics/events/.

Restore to YTsaurus:

ytclone s3://my-bucket/export/home/analytics/events \
  //home/analytics/events_copy --log-file restore.log

The restore destination is used exactly as given: the children of events go directly under //home/analytics/events_copy. The same commands work for a single table, file, or document. With --log-file, progress appears on the console and detailed logs are appended to the file.

Repeated runs

Run the same command again after an interruption or a source update. Completed, unchanged nodes are skipped. New, changed, or incomplete nodes are copied again; an interrupted table, file, or document starts from the beginning, not from its last part.

Source data is never deleted. Destination nodes absent from the source are kept. Use a separate S3 prefix for each source cluster.

Parallel export

Export large tables through several streams in one process:

ytclone //home/analytics/events s3://my-bucket/export \
  --concurrency 4 --max-streams 8 --log-file export.log

Up to four nodes are active, sharing eight export streams. A single large table can use all eight streams; ready tables take turns when streams become available. Files and documents use one stream at a time. By default, the stream count equals --concurrency.

For trees with many nodes, use multiple copy processes:

ytclone-parallel //home/analytics/events s3://my-bucket/export \
  --processes 2 --concurrency 2 --log-file export.log

This runs two processes with two active nodes and two export streams each, prioritizing directories and small nodes. Each process owns its stream pool; one table stays in one process. Parallel mode supports YT → S3; restore its archives with ytclone as above. Restore reads each node's parts sequentially.

Before you copy

  • Supported node types: static tables, files, YSON documents, and directories. Dynamic tables are skipped and reported; links are unsupported.
  • One current S3 copy. There is no archive version history. Replacing a node makes its archive unavailable until completion; a failed replacement can lose the previous complete copy.
  • Permissions are not copied. ACLs, ownership, and account settings are excluded. Replacing an existing YT table, file, or document recreates the node, so its previous settings are not preserved either.
  • Consistency is per node. A directory tree is not a single point-in-time snapshot.
  • Avoid overlapping writers. Do not run commands that write to the same destination nodes concurrently, or restore an archive while it is being replaced.

Documentation

Run ytclone --help or ytclone-parallel --help for all command-line options.

  • User guide: paths, configuration, progress, retries, and parallel export.
  • Architecture: archive format, change detection, and execution diagrams.
  • Contributing: installation from source, development, and tests.

License

MIT.

Metadata

Release files for ytclone 0.1.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ytclone 0.1.20
File Size Uploaded Provenance Actions
ytclone-0.1.20.tar.gz 50.3 kB With provenance Details for ytclone-0.1.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ytclone 0.1.20
File Interpreter ABI Platform Actions
ytclone-0.1.20-py3-none-any.whl Python 3 none any Details for ytclone-0.1.20-py3-none-any.whl

Total release size: 112.1 kB

Release files / ytclone-0.1.20.tar.gz

Download URL ytclone-0.1.20.tar.gz
Size 50.3 kB
Tags Source
SHA-256 checksum
How to use checksums
06ca19878337189559ea61dfb729324c96f3021d962787da3071d750464e6f4e
BLAKE2b-256 checksum
How to use checksums
37fd3b1644078da813e3a40d1e6c0fe58896484c45f5d176fe5d844b476d2ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / ytclone-0.1.20-py3-none-any.whl

Download URL ytclone-0.1.20-py3-none-any.whl
Size 61.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49c151717c333ac6e0d15ecf477b9548c0b62f9c91db5faa01f7c1a9bc93815f
BLAKE2b-256 checksum
How to use checksums
25f0c9a5f686d515c683074d9b417c9e889dae863e6c31d2463e560525b5b455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for ytclone 0.1.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ytclone-0.1.20.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page