Skip to content

re:Post : Need to recover accidentally deleted some file on the Lightsail storage bucket.

0

Hi, We accidentally deleted some files on the Lightsail storage bucket. If needed I can share the reference folder links.

Please help us to recover those deleted folders.

Thanks, Dilan

asked 2 years ago306 views

3 Answers
1

Hello.

If the bucket does not have versioning enabled as mentioned in re:Post Agent's answer, you will not be able to restore it.
https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-managing-bucket-object-versioning.html

If versioning was originally enabled on the bucket, you can restore it using the steps in the documentation below, but if versioning was not enabled before the object was deleted, it cannot be restored.
https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-restoring-bucket-object-versions.html

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

0

I apologize, but I'm afraid recovering accidentally deleted files from a Lightsail storage bucket may not be possible unless certain precautions were in place beforehand. Here's what you need to know:

  1. If versioning was not enabled on the bucket before the deletion occurred, there is unfortunately no way to recover the deleted files. Amazon S3 (which Lightsail storage buckets are based on) does not keep hidden copies of data you've deleted.

  2. If versioning was enabled on the bucket prior to deletion, there might be a chance to recover the files. In this case, when objects are deleted, they are not permanently removed but rather marked with a delete marker. You would need to check if you can see previous versions of the files by enabling "show versions" in the bucket interface.

  3. Even if versioning was enabled, if someone used the "empty bucket" action or permanently deleted versioned objects, recovery would not be possible.

  4. For future reference, to protect against accidental deletions, you can:

    • Enable versioning on your buckets
    • Use S3 Object Lock (if available for Lightsail buckets)
    • Set up regular backups using AWS Backup or a similar service

If versioning was enabled and the files were not permanently deleted, you may be able to restore them by removing the delete markers. However, this process can be complex and may require using the AWS CLI or SDK.

Given the critical nature of data recovery, I recommend contacting AWS Support directly for personalized assistance. They may be able to provide more specific guidance based on your account's configuration and the exact circumstances of the deletion.

For the future, it's crucial to implement backup strategies and enable versioning on important buckets to prevent data loss in similar situations.
Sources
Is there a way to restore a folder completely deleted from s3? | AWS re:Post
Retrieve deleted S3 files? | AWS re:Post
Recover a recent deleted Bucket | AWS re:Post
Retrieve an Amazon S3 object that was deleted | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Hi Riku,

    Thank you for sharing this. We have connected the storage bucket to our WordPress WooCommerce website, where product images are stored. Periodically, we remove products, and as part of this process, we have enabled a function to automatically delete the associated product images. However, this function also deleted the entire product image directory within the storage bucket.

0

Hi,

Please open a support case with AWS with relevant details and we would be happy to assist you. If you have a basic (free) support plan, you can create a support case with a general question under Accounts and billing category.

Thanks!

AWS
MODERATOR

answered 2 years ago

  • I have submitted the case. But they asked me to submit a question here.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.