Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Initiate a Restore Request:

    Code Block
    languagebash
    aws s3api restore-object --bucket YOUR_BUCKET_NAME --key YOUR_FILE_KEY --restore-request Days=NUMBER_OF_DAYS_TO_KEEP_RESTORED,GlacierJobParameters={Tier="STANDARD"}
    • Replace YOUR_BUCKET_NAME with the name of your bucket.

    • Replace YOUR_FILE_KEY with the S3 key of the file you want to restore.

    • Replace NUMBER_OF_DAYS_TO_KEEP_RESTORED with the number of days you want to keep the restored copy available for. After this time period, the temporary copy will be deleted, but the original in Glacier Deep Archive remains.

  2. Check the Restoration Status:
    It typically takes about 12 hours for the restoration process to complete. To check the status:

    Code Block
    languagebash
    aws s3api head-object --bucket YOUR_BUCKET_NAME --key YOUR_FILE_KEY

    In the output, look for the "Restore" field. When the file is ready, it'll state "ongoing-request": "false".

  3. Retrieve the Restored File:
    After restoration completes:

    Code Block
    languagebash
    aws s3 cp s3://YOUR_BUCKET_NAME/YOUR_FILE_KEY DESTINATION_PATH_ON_YOUR_LOCAL_MACHINE

    Replace DESTINATION_PATH_ON_YOUR_LOCAL_MACHINE with where you want to download the file to.

Remember, you're You are only billed for the restored copy of the file for the number of days you specified in the restore request. After those days, the temporary restored copy will be deleted, but the original in the Glacier Deep Archive will remain intact.

...