Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rolling back version on whole s3 bucket

I have an s3 bucket on aws with versioning enabled. I need to "rollback" to the previous version. Not file by file but the whole bucket. Is there any software i can use? or any command on the console that i can run? it's an emergency and time sensitive.

Thanks you!

like image 935
acanessa Avatar asked Oct 19 '25 14:10

acanessa


1 Answers

There is no concept of "rollback to the previous version" for a bucket.

Each object maintains a version history, and each historical version of each object is maintained and accessible.

If you wish to abandon the most recent version of each object, you would need to write a script/program that would:

  • Obtain a list of all objects
  • For each object:
    • Obtain a list of versions
    • Delete the most recent version

The prior version of each object would then become the current version.

Alternatively, you could obtain the previous version of each object without removing the current version. This would involve a similar script/program, without the delete step.

like image 189
John Rotenstein Avatar answered Oct 22 '25 06:10

John Rotenstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!