Skip to content

ericvolp12/s3purge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Delete all objects from a S3-compatible bucket very quickly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published