Goal
Move a provider library into Assets with deterministic folder mapping, checksum evidence, restart-safe progress, and an item-level audit report.Prerequisites
- A verified Cloudinary, S3-compatible, or native S2 source connection
- A destination Assets bucket and its UUID
- An
assets:processtoken to start, cancel, or retry andassets:readto inspect or download reports
Workflow
1
Run a dry migration with the intended source prefix and conflict policy.
2
Wait for inventory to complete, then inspect summary counts and the JSON or CSV item report.
3
Start a non-dry migration with the same mapping once duplicate, conflict, unsupported-object, and pending-checksum outcomes are acceptable.
4
Follow persisted phase, item, and byte counters. Cancel cooperatively or retry only terminal failed items when needed.
5
Retain the report as migration evidence and verify a sample of imported assets through StackShift CDN URLs.
What discovery preserves
- Cloudinary: paginated
image,video, andrawupload resources; the public ID becomes the folder/key, the format becomes the extension when needed, and tags, context, structured metadata, resource type, source URL, and source identity remain in migration evidence. - Cloudinary imports originals only. StackShift regenerates transforms, thumbnails, video outputs, and other derivatives under the destination bucket policy.
- S3-compatible and S2: recursive objects beneath
source_prefix; relative keys preserve folder structure, and content type, cache control, object metadata, object tags, size, provider checksum when available, and source identity are recorded. - Discovery is paginated and idempotent by
(migration, source_identity), so worker restarts do not duplicate inventory rows.
Create Cloudinary and S2 source connections
Cloudinary configuration keeps the cloud name and API key as non-secret connection data and encrypts the API secret. A native S2 import source is astackshift_s2 connection that references an owned bucket UUID and carries no credentials.
Dry-run semantics
A dry run finishes after inventory. It may issue list and metadata/tag reads, but it does not download objects just to manufacture a missing checksum and does not create assets. The item report is the source of truth for what was and was not knowable before execution.duplicate_checksum: a known SHA-256 already maps to an asset in the same Assets space.key_conflict: the destination bucket already contains the proposed logical key.unsupported_object: the known size or MIME type violates destination bucket policy.pending_execution: checksum evidence requires streaming the object during the real run.inventory_lookup_failed: StackShift could not safely classify an item and records an error instead of guessing.
Start and follow a migration
Checksum deduplication and key conflicts
- Execution streams the source through bounded scratch space and calculates SHA-256 before asset commit.
- Deduplication is Assets-space-wide. Duplicate content is skipped,
mapped_asset_idpoints to the existing asset, and no alias asset is created. skipis the default conflict policy and preserves the existing logical asset.new_versionreplaces the compatible existing logical asset through revision-aware versioning. Exact normalized MIME compatibility is required.renameappends the first eight hex characters of the source-identity SHA-256 before the extension, then a stable numeric suffix if that name is also occupied.
Progress, retries, cancellation, and reports
- Migration states are
queued,running,completed,failed, andcanceled; phases begin atinventory, continue throughtransfer, and finish atcomplete. - Persisted counters include total/processed/imported/skipped/failed items and total/processed bytes. They remain available independently of the worker process.
- Each item stores attempt count, maximum attempts, checksum state, mapped asset, warning/error code and message, timestamps, and source/destination identity. Automatic transfer retries use bounded backoff.
- Cancellation is cooperative: active work stops, unclaimed items become canceled, incomplete multipart work is aborted, and scratch data is removed. Start a new migration to continue a canceled migration.
- JSON contains the complete migration and item objects. CSV columns are
source_identity,source_key,destination_key,status,checksum_sha256,mapped_asset_id,warning_code,error_code, anderror_message.
Expected result
Every discovered source identity ends in an imported, skipped, failed, or canceled item with checksum and mapped-asset evidence where available.
Common failures
Related guides
Storage connections, BYOB, and StackShift S2
Configure AWS S3, Cloudflare R2, Wasabi, MinIO, generic S3, or native StackShift S2 without exposing customer storage credentials or changing delivery URLs.
Assets platform API, SDK, CLI, and operations
A complete interface and recovery reference for storage connections, S2, imports, relocation, OCR, browser capabilities, reports, scopes, events, billing, and durable worker behavior.
Upload UX and DAM
Build a durable upload and digital-asset-management workflow with resumable sessions, revision-safe mutations, search, collections, webhooks, and usage summaries.