Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

Want it done for you?

Let the Duplicator experts migrate your WordPress site for you — quick, safe, and hassle-free.

Get Migration Help

Storing Your Backup to Cloudflare R2


Are you looking to create a Cloudflare R2 backup? Welcome to our guide on using Cloudflare R2 and Duplicator for storing your backups. In today’s world, keeping your important backups safe is super important. Cloudflare R2 is a great way to store your backups online, and Duplicator makes it easy to do. This guide will show you step-by-step how to connect Duplicator with Cloudflare R2, so you can keep your website backups safe and sound. Whether you’re a tech whiz or just starting out, we’ve got you covered!

Cloudflare R2 is an object storage service for storing large amounts of unstructured data like pictures, videos, data lakes, website backups, and more. Similar to other providers like Amazon S3, Wasabi, and Google Cloud, Cloudflare R2 organizes data as objects inside buckets. 

Create a Cloudflare R2 Bucket

  1. The first 10GB of storage is free, so click Get Started for Free.
  2. Register for a new account, then verify your email address.
  3. In the Cloudflare dashboard, click the R2 tab and enter your payment information. Cloudflare only charges you if you exceed the monthly storage limits:
  4. Now, go ahead and click on Create Bucket:
  5. Name the new bucket. You can allow Cloudflare to automatically choose your bucket’s region, or specify one yourself. Next, hit Create Bucket again:

You now have a cloud storage bucket ready to store your backups.

Copy Your Access Keys

To authenticate, you’ll need to generate the access keys.

  1. On the Overview page in your dashboard, click on Manage R2 API Tokens:
    Manage API token
  2. Next, click on Create API Token:
    Create R2 API token
  3. Name the token, and select the Object Read & Write permissions level:
    Cloudflare R2 new token
    Note: The token must have the Object Read & Write permission scoped to the bucket you use for backups. A token scoped to read-only access, or to the wrong bucket, causes Duplicator’s backup uploads to fail.
  4. Apply these permissions to all of your buckets, or the one you just created. You can also decide how long this token will stay active:
    Cloudflare R2 token settings
  5. Once the API token is generated, you’ll get access keys. Copy these so you can use them in the next step:
    Cloudflare R2 access keys
  6. You’ll also need your S3 API endpoint, in the format https://<accountid>.r2.cloudflarestorage.com. Fetch it from your bucket settings:
    Cloudflare R2 S3 API

With the above information, you can successfully authorize Duplicator to send backups to Cloudflare R2!

Connect Cloudflare R2 to Duplicator

  1. Navigate to Duplicator Pro » Storage » Add New:
    Add new storage location
  2. Name the new storage and select Cloudflare R2 as the Type:
    New Cloudflare R2 storage
  3. Under Authorization, paste your access key, secret key, and endpoint. If you allowed Cloudflare to choose your region, enter auto. Finally, add your bucket name:
    Duplicator Cloudflare authorization
  4. You can adjust the Max Backups value if you want to avoid storing too many backups in your Cloudflare account. Duplicator will delete old backups, optimizing your storage space.
    Duplicator cloud storage settings
  5. After saving the storage, click Test Storage to confirm the setup works. If Duplicator can create and delete a small file on Cloudflare R2, your new cloud backup location is ready. If the test fails, see our guide to Troubleshooting Amazon S3 or S3 Compatible Storage Issues for solutions that also apply to Cloudflare R2.

You have successfully connected Cloudflare R2 to Duplicator. Your website backups now upload to Cloudflare R2 automatically each time you create a backup, giving you a secure, off-site copy in case anything happens to your server.

Would you like to automate this process further? Check out our guide to Create Automated Backup to schedule backups on a recurring basis.


Was this article helpful?


Related Articles

Don't Let Another Day Pass Unprotected

Every hour without proper WordPress backups puts your site at risk • Every delayed WordPress migration costs you performance and growth

Get Duplicator Now
Duplicator Plugin

Wait! Don't miss your
exclusive deal!

As a customer, you get 60% OFF

Try Duplicator free on your site — see why 1.5M+ WordPress pros trust us. But don't wait — this exclusive 60% discount is only available for a limited time.

or
Get 60% Off Duplicator Pro Now →