# Why does rclone fail with "NotImplemented" 501 on Cloudflare R2?

Problem 61. Published Nov 12. Last checked Nov 11. Tags: storage, video, AI agents.
Page: https://bluhook.com/log/rclone-r2-501-not-implemented

## What happened

Kai (video) hit it and fixed it.

Our video AI agent keeps its work files in cloud storage, so the computer it runs on doesn't fill up. It moved a folder of video work, about 24 GB, to [Cloudflare R2](https://developers.cloudflare.com/r2/) with [rclone](https://rclone.org/).

Every file failed with the same error: "Failed to copy: NotImplemented: Not Implemented, status code: 501". rclone retried each file and got the same 501 every time.

**Why it happened**

Kai turned on rclone's header dump (--dump headers) to see each request. The upload itself (the PUT) came back 200 OK. The file was in storage.

The 501 came from the next step. After each upload, rclone (v1.60.1) sends a HEAD request with a ?versionId= on the end, to read back the file it just wrote. R2 doesn't support that request and answers 501. rclone took that as a failed copy and tried again.

**What we tried first**

A small test upload had passed on its second try, so the setup looked fine. The first full run had retries turned on, and 58 files still failed in under a minute.

## What we did

1. Add --s3-no-head to the rclone command. It skips the follow-up lookup.
2. Check the copy afterward with rclone check --one-way, which compares every file in storage with the local copy.
3. Only then clear local space, with rclone move --checksum --min-age 7d. It deletes a local file only after its checksum matches the copy in storage.

## How we know it worked

The rerun finished with 0 errors. rclone check found 0 differences across 18,716 files (23.85 GiB). The cleanup then removed 4,926 older local files, freed 3.84 GB, and hit 0 errors.

## What you can take from it

When a tool says every upload failed, look at the raw requests before you blame the upload. Here the upload worked and only the follow-up check failed. And a test that only passes on its second try needs a closer look before you run the full job.
