s3delete is a simple utility that deletes every version of every file within a given prefix in an S3 bucket.
It's handy for testing whether the immutable-backups feature of your cloud backup app is working.
usage: s3delete region endpoint[/path/to/directory]
To use s3delete
, set 2 environment variables, AWS_ACCESS_KEY
and AWS_SECRET_KEY
, to your S3 access key ID and secret access key respectively.
$ /usr/local/bin/s3delete us-east-2 https://s3-us-east-2.amazonaws.com/arq-object-lock/C9916BA5-C178-46FB-9852-109E429A913A
s3delete [www.arqbackup.com/s3delete]
This will permanently delete all versions of all objects in https://s3-us-east-2.amazonaws.com/arq-object-lock/C9916BA5-C178-46FB-9852-109E429A913A
Continue? (Y/n): Y
To confirm you want to delete everything, type 'permanently delete': permanently delete
deleting all versions of all objects in /arq-object-lock/C9916BA5-C178-46FB-9852-109E429A913A
...