Skip to content

Update Rclone example #22095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: production
Choose a base branch
from

Conversation

rickyrobinett
Copy link
Collaborator

Summary

Re-organizing and adding some additional context in Rclone tutorial.

Documentation checklist

Copy link
Contributor

hyperlint-ai bot commented Apr 30, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Reorganized and enhanced the Rclone tutorial for better clarity and usability.

  • Updated the title for improved clarity.
  • Added an overview section explaining Rclone's capabilities.
  • Included detailed steps for setting up Rclone with Cloudflare R2.
  • Expanded sections on common file operations and troubleshooting.

Modified Files

  • src/content/docs/r2/examples/rclone.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@github-actions github-actions bot added the product:r2 R2 object storage: https://developers.cloudflare.com/r2 label Apr 30, 2025
import { Render } from "~/components";
import { Render, Steps } from "~/components";

## Overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, AI sometimes gets heading happy.

I'd typically avoid Overview b/c it's implicit as the top section of the page.


## Overview

[Rclone](https://rclone.org/) is a command-line tool that allows you to manage files on cloud storage directly from your terminal. With Rclone, you can:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely an improvement over the previous lead-in.


## Prerequisites

Before you begin, you'll need:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI gets a little contraction happy, imo

Before you begin, you'll need:

- [Rclone installed](https://rclone.org/install/) on your system (v1.59 or later)
- An R2 bucket created in your Cloudflare account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accurate? If so, good (and slightly embarrassing) improvement over the original

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Point 1, yes. Point 2, technically you could try to set this up without any R2 buckets but then there would be nothing for Rclone to do, so I think having a bucket created is a default for productive use.

2. Select a name for the new remote. For example, use `r2`.
3. Select the `Amazon S3 Compliant Storage Providers` storage type.
4. Select `Cloudflare R2 storage` for the provider.
5. Select `1` to enter your access credentials manually.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accurate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I went through this to check.

# Creates ./downloads/report.pdf on your local machine
```

### Syncing directories
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not present before? I don't hate it, but unclear if hallucinating

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested. But let's have @Oxyjun double check.

- `--s3-chunk-size`: The size of each part (default: 5MB)
- `--s3-upload-cutoff`: Files larger than this will use multipart upload (default: 200MB)

:::tip[Multipart upload cost optimization]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be really careful around cost optimization recommendation if it came from AI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Came from the original doc, just reworded.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But still good for @elithrar to validate the framing here.

You can also generate presigned links which allow you to share public access to a file temporarily using the [rclone link](https://rclone.org/commands/rclone_link/) command.
### Common file operations

Rclone provides many other useful commands for managing your R2 objects:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this section needs to be here. AI can be too verbose.

R2 doesn't support the `--unlink` flag in rclone.
:::

## Mounting R2 buckets as local filesystems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might not be necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific example was the main thing I started wanting to add to the doc, haha.

- For macOS, you may need to install [macFUSE](https://osxfuse.github.io/) first
:::

## Troubleshooting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example page, don't think we need the following content.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a good debate. Would love @elithrar 's feedback. I'm ok cutting, though added in part because I hit a couple errors trying to get going myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants