> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bitiful.com/en/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bitiful.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.bitiful.com/_biti/feedback/agent.

# Migrate to Bitiful

> Migrate to Bitiful from another object storage service, your own servers, or another CDN: assess before you migrate, create buckets and permissions, move existing files, switch reads and writes without downtime, switch the CDN and certificates, then verify and retire the old service.

Bitiful is compatible with the S3 protocol, so most programs can switch over by changing just the Endpoint and keys. This page walks through a complete migration in order, with a focus on **no downtime** and **no missing data**.

| Phase                              | What to do                                                                                | Features used                                                                                                                                 |
| ---------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. Assess                          | Identify the features you use, your data volume, and how files are accessed               | [Limits](https://docs.bitiful.com/en/bitiful-s4/limits.md), [S3 API compatibility](https://docs.bitiful.com/en/developer/s3/compatibility.md) |
| 2. Prepare                         | Create buckets, sub-users, and permissions, and set up public read and hotlink protection | Buckets, sub-users, access control                                                                                                            |
| 3. Move hot data                   | Have frequently used files moved over automatically on first access                       | [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md)                                                            |
| 4. Switch writes and reads         | Point your programs at Bitiful and your read URLs at the new storage                      | S3 SDKs, CDN domains                                                                                                                          |
| 5. Fill in cold data               | Sync files that are rarely accessed                                                       | [Rclone](https://docs.bitiful.com/en/clients/rclone.md)                                                                                       |
| 6. Switch the CDN and certificates | Point your domain's CNAME to Bitiful, with rules and certificates in place                | CDN, edge rules, Certificate Center                                                                                                           |
| 7. Verify and retire               | Check file counts and sizes, remove back-to-origin rules, and retire the old service      | Rclone verification, Usage                                                                                                                    |

> **Tip**
>
> Before you migrate, you can use the [free tier](https://docs.bitiful.com/en/prices/basic.md#free-tier) to run a small directory through the whole process and confirm that your programs, tools, and access behave as expected.

## 1. Assess

### Feature mapping

| Feature you use on your current platform                 | How to do it on Bitiful                                                                                                                                                                                                                                       |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Standard, infrequent access, and archive storage         | There's only one storage class, so put everything in the same bucket. There are no retrieval fees                                                                                                                                                             |
| Bucket Policy, ACL                                       | Use [sub-user permissions](https://docs.bitiful.com/en/bitiful-s4/handbook/permissions.md) to control program access, and [public read and private](https://docs.bitiful.com/en/bitiful-s4/handbook/public-read.md) to control anonymous access per directory |
| Referer hotlink protection, IP allowlists and blocklists | The bucket's [access control](https://docs.bitiful.com/en/bitiful-s4/handbook/anti-leech.md), or the CDN's [edge rules](https://docs.bitiful.com/en/cdn/handbook/access-control.md)                                                                           |
| CORS                                                     | [CORS settings](https://docs.bitiful.com/en/bitiful-s4/handbook/cors.md)                                                                                                                                                                                      |
| Image processing service                                 | [CoreIX](https://docs.bitiful.com/en/coreix/basic.md) processing parameters and [styles](https://docs.bitiful.com/en/coreix/handbook/styles.md). Parameter names need to be mapped and changed                                                                |
| Static website hosting                                   | [Static websites and domains](https://docs.bitiful.com/en/bitiful-s4/handbook/website.md) plus the CDN                                                                                                                                                        |
| Back-to-origin, mirroring                                | [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md), CDN [custom origins](https://docs.bitiful.com/en/cdn/handbook/origin.md)                                                                                                  |
| CDN rules                                                | [Edge rules](https://docs.bitiful.com/en/cdn/handbook/rules.md). Cloudflare rules can be [imported directly](https://docs.bitiful.com/en/cdn/handbook/rules.md#import-from-and-export-to-cloudflare)                                                          |
| Signed download links                                    | [Presigned URLs](https://docs.bitiful.com/en/developer/s3/presigned-url.md), or the CDN's [advanced authentication](https://docs.bitiful.com/en/best-practice/token-link.md)                                                                                  |

> **Warning**
>
> Lifecycle rules, server-side encryption, WORM, and versioning aren't supported yet. If your workload depends on these features, please evaluate alternatives first, such as having your program clean up expired files periodically, or encrypting files on the client before upload.

### Data and access

- **Data volume and file count**: These determine how you move data and how long it takes. If you have a very large number of files, we recommend running the sync tool on a cloud server.
- **Egress fees**: Reading data out of your current platform usually incurs internet egress fees, so estimate them in advance.
- **Access patterns**: Separate the parts accessed by programs through SDKs, the parts users access through links, and the parts delivered through a CDN, and plan the switch for each.
- **Object keys**: Files whose keys contain `?`, `#`, or `%` may not be fetched through mirror back-to-origin. Sync them separately with a tool.

## 2. Prepare buckets and permissions

### Create buckets

Create one bucket for each of your original buckets. Bucket names are globally unique. See [Bucket management](https://docs.bitiful.com/en/bitiful-s4/handbook/buckets.md).

### Create sub-users

Create sub-users by program purpose, grant them access to the buckets or directories they need, then create AccessKeys. See [Sub-users and AccessKeys](https://docs.bitiful.com/en/bitiful-s4/handbook/access-keys.md).

### Set up public read and access control

Set directories that were public to [public read](https://docs.bitiful.com/en/bitiful-s4/handbook/public-read.md), then configure [hotlink protection](https://docs.bitiful.com/en/bitiful-s4/handbook/anti-leech.md) and [CORS](https://docs.bitiful.com/en/bitiful-s4/handbook/cors.md) as needed.

### Migrate processing rules

Rewrite your current platform's image processing parameters as [CoreIX parameters](https://docs.bitiful.com/en/coreix/basic.md), and save frequently used combinations as [styles](https://docs.bitiful.com/en/coreix/handbook/styles.md). To hide original images, turn on [Original file protection](https://docs.bitiful.com/en/coreix/handbook/origin-protect.md).

## 3. Move hot data with mirror back-to-origin

With mirror back-to-origin, when a bucket can't find a file, it automatically fetches it from your current platform, returns it to the visitor, and saves it. Frequently used files are moved over automatically the first time they're accessed, with no downtime for your business.

1. On the bucket's **Mirror back-to-origin** tab, add a rule, and set the origin to an address on your current platform that allows anonymous reads.
2. Test with a file you know exists on your current platform, and confirm that it's returned correctly.
3. If your current platform has hotlink protection or User-Agent restrictions, allow User-Agents starting with `@Bitiful/MirrorServer`, and allow empty Referers.

See [Mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md).

## 4. Switch writes and reads

### Programs

Change your SDK configuration to Bitiful:

| Setting                           | Value                    |
| :-------------------------------- | ------------------------ |
| Endpoint                          | `https://s3.bitiful.net` |
| Region                            | `cn-east-1`              |
| Access Key ID / Secret Access Key | The sub-user's keys      |

After the switch, new files are written directly to Bitiful. For examples in each language, see [SDK overview](https://docs.bitiful.com/en/developer/sdk/intro.md).

### Links

Change file URLs in your pages and apps to your Bitiful [CDN domain](https://docs.bitiful.com/en/cdn/handbook/domains.md) (or the bucket domain). If you already use your own domain, the change takes effect when you switch the CNAME in step 6, and the links themselves don't need to change.

## 5. Fill in cold data

Files that are rarely accessed won't trigger mirror back-to-origin, so you need to sync them with a tool. Taking Rclone as an example, add both your current platform and Bitiful to the configuration, then copy and verify:

```bash
rclone copy old:old-bucket s4:my-bucket -P --transfers 16
rclone check old:old-bucket s4:my-bucket --size-only
```

`copy` skips files that already exist, so you can run it multiple times. For how to configure your current platform, see [Rclone · Migrate from other clouds](https://docs.bitiful.com/en/clients/rclone.md#migrate-from-other-clouds).

## 6. Switch the CDN and certificates

### Add a CDN domain

[Add a CDN domain with the same name](https://docs.bitiful.com/en/cdn/handbook/domains.md) on Bitiful, and choose the new bucket as its origin. The domain needs an ICP filing, and you may need to verify domain ownership when you add it.

### Prepare certificates

[Request an auto certificate](https://docs.bitiful.com/en/certs-center/auto-cert.md) in the Certificate Center, or [upload your existing certificate](https://docs.bitiful.com/en/certs-center/custom-cert.md), then deploy it to the CDN domain and [turn on HTTPS](https://docs.bitiful.com/en/cdn/handbook/https.md).

### Migrate rules

Rewrite your existing cache, hotlink protection, authentication, CORS, and response header settings as [edge rules](https://docs.bitiful.com/en/cdn/handbook/rules.md). If you were using Cloudflare, you can [import the rules JSON directly](https://docs.bitiful.com/en/cdn/handbook/rules.md#import-from-and-export-to-cloudflare).

### Verify, then switch the CNAME

Use `curl --resolve` or edit your local hosts file to request a few URLs first. Once you've confirmed that the content, response headers, and authentication are all correct, change the CNAME to the Bitiful address at your DNS provider.

After the switch, traffic moves over gradually as DNS caches expire, and the old and new CDNs serve requests side by side in the meantime. See [CDN quickstart](https://docs.bitiful.com/en/cdn/intro.md) and [Edge rules](https://docs.bitiful.com/en/cdn/handbook/rules.md).

## 7. Verify and retire

1. Use `rclone check` to confirm that file counts and sizes match.
2. Watch [Usage](https://docs.bitiful.com/en/console/usage.md) and [Live logs](https://docs.bitiful.com/en/console/access-logs.md) for a few days to confirm there are no unusual 404s or 5xx errors.
3. Delete the [mirror back-to-origin](https://docs.bitiful.com/en/bitiful-s4/handbook/mirror.md) rules.
4. Stop writing to your current platform. Keep it for a while before deleting the original data and retiring the old service.

> **Note**
>
> Until you delete the mirror back-to-origin rules, a file you've deleted from the bucket is fetched from the origin again the next time it's accessed. To delete a file for good, also delete it on your current platform, or remove the rules first.

## Need help?

If you have a large amount of data to migrate or a tight schedule, feel free to contact support. We can help you evaluate your plan and estimate costs.
