Skip to main content

Migrate from Standard S3 Storage

CloudBase Cloud Storage is compatible with the S3 protocol. You can use rclone to migrate data from other S3-compatible storage (Supabase Storage, Alibaba Cloud OSS, Tencent Cloud COS, etc.) to CloudBase Cloud Storage.

This guide covers cloud storage file (objects in buckets) migration only. It does not cover database, authentication, cloud functions, or other resource migration.

Prerequisites: Install rclone

rclone is the core tool for this migration. Written in Go, it is a single binary with no external dependencies and supports data synchronization between all S3-compatible storage services.

Recommended: install via Homebrew.

brew install rclone

Or download the binary manually:

curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip
unzip rclone-current-osx-amd64.zip
cd rclone-*-osx-amd64
sudo cp rclone /usr/local/bin/
sudo chown root:wheel /usr/local/bin/rclone
sudo chmod 755 /usr/local/bin/rclone

Verify Installation

$ rclone version
rclone v1.74.4
- os/version: darwin 15.3 (64 bit)
- os/kernel: 24.3.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.26.5
- go/linking: dynamic
- go/tags: cmount

rclone remote configuration file location:

OSConfig file path
macOS / Linux~/.config/rclone/rclone.conf
Windows%USERPROFILE%\.config\rclone\rclone.conf

Step 1: Configure the CloudBase Target

The CloudBase remote configuration is the same regardless of the source.

Obtain CloudBase Credentials

  1. Log in to Tencent Cloud Access Management Console to get your SecretId and SecretKey
  2. Identify the COS bucket name and its Region in the CloudBase Cloud Storage Console

Configure the Remote

# Edit the config file directly
cat >> ~/.config/rclone/rclone.conf << 'EOF'
[cloudbase]
type = s3
provider = Other
access_key_id = <Your SecretId>
secret_access_key = <Your SecretKey>
endpoint = cos.ap-shanghai.myqcloud.com
region = ap-shanghai
force_path_style = false
EOF

💡 The [cloudbase] in the config block is the remote alias you assign to the CloudBase target. All subsequent rclone commands reference this endpoint via cloudbase:; the : is rclone's separator between remote and path. You can rename it to anything you like (e.g. [tcb]) as long as you keep it consistent throughout.

💡 To learn more about CloudBase Cloud Storage operations, see the Cloud Storage Overview.

⚠️ Important:

  • Region and endpoint must match. e.g., for Shanghai region use ap-shanghai, endpoint should be cos.ap-shanghai.myqcloud.com
  • force_path_style = false is mandatory: Tencent Cloud COS only supports Virtual Hosted-Style addressing. Omitting this will result in 403 PathStyleDomainForbidden.

Verify Connectivity

# List all buckets under CloudBase
rclone lsd cloudbase:

# List files in the target bucket (should be empty or contain only existing data)
rclone ls cloudbase:<target-bucket>

Step 2: Configure the Source S3 Remote

Select the configuration that matches your source storage type.

Migrate from Supabase Storage

  1. Log in to Supabase Dashboard → target project → SettingsStorage
  2. Enable S3 connection and generate S3 Access Key and S3 Secret Key
  3. Note the project reference ID (the <project-ref> part of your Project URL)
cat >> ~/.config/rclone/rclone.conf << 'EOF'
[supabase-source]
type = s3
provider = Other
access_key_id = <Supabase S3 Access Key>
secret_access_key = <Supabase S3 Secret Key>
endpoint = https://<project-ref>.supabase.co/storage/v1/s3
region = <Source Region, e.g., ap-south-1>
EOF
# Verify connectivity
rclone lsd supabase-source:
rclone ls supabase-source:<source-bucket>
rclone size supabase-source:<source-bucket>

Migrate from Alibaba Cloud OSS

  1. Log in to Alibaba Cloud RAM Console to get your AccessKey ID and AccessKey Secret
  2. Confirm the bucket name, Region, and endpoint in the OSS Console
cat >> ~/.config/rclone/rclone.conf << 'EOF'
[oss-source]
type = s3
provider = Alibaba
access_key_id = <Alibaba Cloud AccessKey ID>
secret_access_key = <Alibaba Cloud AccessKey Secret>
endpoint = oss-<Region>.aliyuncs.com
region = <Region>
EOF
# Verify connectivity
rclone lsd oss-source:
rclone size oss-source:<source-bucket>

Migrate from Tencent Cloud COS

Same account, same region (e.g., both source and target in Guangzhou under the same account) — no need for a separate remote. Reuse cloudbase directly:

rclone copy cloudbase:<source-bucket> cloudbase:<target-bucket> --progress

Different account or different region — create a separate source remote:

cat >> ~/.config/rclone/rclone.conf << 'EOF'
[cos-source]
type = s3
provider = Other
access_key_id = <SecretId>
secret_access_key = <SecretKey>
endpoint = cos.<source-region>.myqcloud.com
region = <source-region>
force_path_style = false
EOF
# Verify connectivity
rclone lsd cos-source:
rclone size cos-source:<source-bucket>

Migrate from Other S3-Compatible Storage

AWS S3, MinIO, Qiniu Kodo, UpYun USS, and other S3-compatible storage services can all be accessed via rclone's S3 type:

cat >> ~/.config/rclone/rclone.conf << 'EOF'
[s3-source]
type = s3
provider = <Use "AWS" for AWS, "Minio" for self-hosted MinIO, "Other" for others>
access_key_id = <Access Key>
secret_access_key = <Secret Key>
endpoint = <S3 Endpoint>
region = <Region>
EOF

For more provider types, refer to the rclone S3 documentation.


Step 3: Execute the Migration

We recommend executing in three steps: dry-run preview first, then actual migration, then integrity verification.

# Step 1: Dry run, preview files to be transferred
rclone copy <source-remote>:<source-bucket> cloudbase:<target-bucket> \
--dry-run \
--progress \
--transfers 4

# Step 2: Execute the actual migration
rclone copy <source-remote>:<source-bucket> cloudbase:<target-bucket> \
--progress \
--transfers 4 \
--checkers 8 \
--retries 3

# Step 3: One-way integrity check
rclone check <source-remote>:<source-bucket> cloudbase:<target-bucket> \
--one-way \
--progress

Performance Tuning Suggestions

ParameterPurposeRecommended Value
--transfers NConcurrent file transfers8-16 for same region, 4 for cross-cloud
--checkers NConcurrent checkersUsually 2× transfers
--retries NRetry count on failure3
--bwlimit XBandwidth limit10M recommended for cross-cloud to avoid saturation
--fast-listReduce API callsRecommended for large buckets
# Same-region high-speed transfer
rclone copy <source>:<source-bucket> cloudbase:<target-bucket> \
--transfers 16 --checkers 32 --fast-list --progress

# Cross-cloud rate-limited transfer
rclone copy <source>:<source-bucket> cloudbase:<target-bucket> \
--transfers 4 --bwlimit 10M --retries 3 --progress

About Verification Results

If you see N hashes could not be checked when running rclone check --one-way, this is not an error. Different S3 providers use different ETag/MD5 calculation methods, so rclone cannot directly compare checksums and will automatically fall back to verifying by file name + file size. As long as the final output shows 0 differences + N matching files, the files are fully consistent.


Resume from Interruption

rclone's copy command natively supports resume: re-running the same command after an interruption automatically skips completed files and continues with the rest.

# After Ctrl+C during transfer, simply rerun the same command
rclone copy <source>:<source-bucket> cloudbase:<target-bucket> --progress

rclone Command Reference

Browsing and Viewing

rclone lsd remote: # List all buckets
rclone ls remote:bucket # Recursively list files (with size)
rclone lsl remote:bucket # List files (with size + modification time)
rclone tree remote:bucket # Display directory structure as a tree
rclone size remote:bucket # Count files and total size

Transfer: copy vs move vs sync

CommandPurposeSource filesExtra files in target
copyCopyKeptKept
moveMoveDeletedKept
syncSync (mirror)KeptDeleted

sync makes the target bucket identical to the source. Extra files in the target will be deleted. Always use --dry-run first.

Verification and Comparison

# Checksum verification
rclone check remote:src remote:dst

# One-way check (source → target only)
rclone check remote:src remote:dst --one-way

# Verify by file size (when cross-cloud checksum is unavailable)
rclone check remote:src remote:dst --size-only --one-way

Filter Transfers

# Only transfer images
rclone copy remote:src remote:dst --include "*.{jpg,png,gif}"

# Exclude temporary files
rclone copy remote:src remote:dst --exclude "*.tmp" --exclude ".DS_Store"

# Filter by size
rclone copy remote:src remote:dst --min-size 1M

FAQ

ErrorLikely CauseSolution
403 ForbiddenIncorrect credentials or insufficient permissionsCheck SecretId/SecretKey, confirm read/write access to bucket
403 PathStyleDomainForbiddenrclone defaults to Path-StyleAdd force_path_style = false to the CloudBase remote config
404 Not FoundIncorrect bucket nameConfirm bucket name is correct, endpoint matches Region
SignatureDoesNotMatchSignature errorSecretKey may have extra spaces/newlines, re-copy it
connection refusedNetwork unreachableCheck firewall/proxy, confirm endpoint is publicly accessible
slow transferCross-cloud public network is slowIncrease --transfers concurrency, or remove --bwlimit

Debug Commands

# View rclone configuration
rclone config show

# Run in debug mode (outputs detailed HTTP request logs)
rclone copy source:bucket cloudbase:bucket --progress -vv

# Quick comparison by file size (no checksum verification)
rclone check source:bucket cloudbase:bucket --one-way --size-only

Next Steps