s3purge

command module
v0.0.0-...-420f2f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 14 Imported by: 0

README

S3 Purge

s3purge is a simple Go program to purge the contents of an S3 bucket in parallel.

Existing methods of purging S3 buckets (i.e. rclone purge) are rather slow and don't have the performance required to expeditiously delete large numbers (hundreds of thousands to millions) of objects in a reasonable timeframe.

s3purge has been tested on Cloudflare's R2 object storage to delete ~3,000 objects per second using the default concurrency of 250.

Building and Running

Build with the included makefile using:

make build

Run the binary produced with flags for your S3 backend:

$ ./s3purge --endpoint {your_s3_backend_https_url} --accessKey {your_key} --secretKey {your_secret} --bucket {your_bucket_name}

By default, s3purge outputs a progress marker every 5 seconds with the average rate of deletion.

When no objects remain, s3purge will exit and tell you how many objects it deleted.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL