Graphon Docs

Populate your bucket

Copy your objects to Graphon Storage and connect your application.

Copy objects from your current storage to a Graphon bucket with the Graphon CLI. Your login must have the editor role. Keep the source available until you verify the copied data and test your application with Graphon.

Give the CLI the source keys

The CLI reads the keys of your current storage only from the standard AWS environment variables. Use keys that can list and read the source bucket. Set AWS_SESSION_TOKEN too when the keys are temporary.

Source keys

export AWS_ACCESS_KEY_ID=<source access key ID>
export AWS_SECRET_ACCESS_KEY=<source secret access key>
export AWS_REGION=us-east-1   # Amazon S3 only: the region of the source bucket

Preview and copy

A dry run counts the source objects and bytes and lists what it would copy. It changes nothing.

Preview

graphon objects sync destination-bucket --from s3://source-bucket --dry-run

Then copy. Each object keeps its key and content type. Add s3://source-bucket/<prefix> to copy one folder, and --prefix to put the objects under a folder in Graphon. The copy never deletes an object. If it stops, run the same command again: it skips each object that Graphon already holds with the same size.

Copy objects

graphon objects sync destination-bucket --from s3://source-bucket

For Cloudflare R2, Google Cloud Storage with HMAC keys, or MinIO, add the provider's S3 URL with --from-endpoint. For Azure Blob Storage, download the container to a folder first, then copy the folder with --dir.

Other providers

graphon objects sync destination-bucket --from s3://source-bucket \
  --from-endpoint https://<account id>.r2.cloudflarestorage.com

Verify and switch your application

Run the dry run again. It must report Would upload 0, and the skipped count must equal the number of source objects. Test the reads and writes your application needs before changing its storage endpoint and credentials.

If your source still accepts writes, run the copy again before you switch your application. A copy does not keep the two stores synchronized.

Was this page helpful?
View as Markdown