You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case, I had a list of exact object names to restore so was able to come up with a loop to find the latest version of the an object that was deleted at any point in time, and copy it over to another S3 bucket (or simply remove the deleted flag on same bucket too).
the key command was this line: aws s3api list-object-versions --bucket MY_BUCKET --prefix 'FOLDER/FILE.TXT' --query 'Versions[?Key==FOLDER/FILE.TXT]' | jq -c '[.[]] | max_by(.LastModified)|.VersionId' -r
while it needs the exact object name and thus is slow, it gets the latest version from what could be many. With object NAME+VersionId, we can also copy it to a new bucket with no need to restore first (not sure if this would be well fit for this project, but there is the idea).
Hi, I'd like to suggest to add an option to restore all files that have been deleted from a bucket, but without the need to specify a date/range.
It would be important to list only the latest version before the delete marker (or with flags to restore all versions maybe).
would it be too hard to implement in this tool?
cheers
The text was updated successfully, but these errors were encountered: