All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

How to recover a deleted file (Trix) that was stored on Amazon S3?

This content has been automatically translated from Ukrainian.
I am adding content to the site using the Trix editor. A Bucket (Amazon S3) is used as the server for storing images. A situation arose where all images were deleted from the blog post. Amazon is quite smart and does not delete everything at once and forever (permanent delete). So I found a way to recover deleted images.

#1 Step. Go to the Bucket and show all file versions.

Go to Amazon > Buckets > Your bucket. Then click on the Show versions toggle. After that, you will see the file versions.
Amazon > Buckets > Ваш bucket (Show Versions)
Amazon > Buckets > Ваш bucket (Show Versions)

#2 Step. Find the deleted file marker.

You can use the browser's page search (CMD+F on Mac). Search for the text 'Delete Marker'
Delete Marker на Amazon s3
Delete Marker на Amazon s3
As you can see - the first file is the Delete marker, and below it (there is even a hierarchy icon) is the actual file. That is, Amazon creates such marker files and attaches them to the real files that will be deleted later (I don't know after how many days the file will be permanently deleted; I restored all files after two days when I noticed the problem).

#3 Step. Delete the Delete marker.

It's simple, we need to delete the Delete marker, then the file will return to its place. But be careful - do not select the actual file.
Видиляємо delete marker
Видиляємо delete marker
After clicking on Delete - we will see a separate page where we need to confirm the deletion by typing the phrase 'permanently delete' as confirmation of the intention to delete the file forever. Copy the file name somewhere, as we will be looking for it later to ensure that everything was done correctly.
Підтвердження - permanently delete
Підтвердження - permanently delete
The Delete objects button is activated only when you type 'permanently delete'.
Активна Delete Objects
Активна Delete Objects
After confirmation, there will be a confirmation message.
Successfully deleted objects
Successfully deleted objects
To check for the file's presence - we will enter its name in the search, and we will see that it exists, and the Delete marker has disappeared. The links to this file will work again.
 
Screenshot 2023-11-20 at 21.02.16 Large.jpeg

This post doesn't have any additions from the author yet.

10 Jul 05:43

What is a distribution?

meme code
meme code@memecode
24 Jul 11:02

What is apt-get in Ubuntu?

meme code
meme code@memecode
24 Jul 11:25

How to install Steam on Ubuntu? Installing Steam via the terminal.

meme code
meme code@memecode
24 Jul 11:47

How to change the language in Steam to Ukrainian?

meme code
meme code@memecode
24 Jul 12:01

What is "Vulkan Shader Processing" in Steam?

meme code
meme code@memecode
24 Jul 12:17

How to make Counter-Strike: GO fullscreen in Ubuntu without launching the game?

meme code
meme code@memecode
29 Nov 08:47

What is the difference between var and let in Javascript?

meme code
meme code@memecode
07 Dec 07:42

What is encapsulation in OOP?

meme code
meme code@memecode
07 Dec 08:13

Visibility control in Ruby (public, private, and protected)

meme code
meme code@memecode
07 Dec 08:25

What is OOP (object-oriented programming)?

meme code
meme code@memecode
09 Dec 12:00

What is inheritance in Ruby? Examples of bad and good inheritance.

meme code
meme code@memecode
09 Dec 12:15

What is best practice in programming?

meme code
meme code@memecode