WinSCP - Files that is Glacier Deep Archive can be initiated to Restore?

0

Dear AWS Community,

Is there anybody here utilizing WinSCP to browse Files in S3? We wanted to use WinSCP to browse and download Files which is in the Glacier Deep Archive state. Is there a way to initiate a RESTORE while in the WinSCP GUI rather than doing it on the AWS Console?

Cheers!

已提问 2 个月前160 查看次数
4 回答
1

Hello.

As far as I know, WinSCP does not allow restore of S3 objects stored in Glacier Deep Archive.
https://winscp.net/eng/docs/guide_amazon_s3

profile picture
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前
profile pictureAWS
专家
iBehr
已审核 2 个月前
  • Hi @Riku, Thanks for your input. How about Uploading via WinSCP, is there a way to set the Storage Class to Deep Archive instead of Standard while uisng WinSCP?

0

WinSCP is primarily a file transfer software and it does not support the required operations needed for transitioning with S3 storage classes such as Glacier Deep Archive. Possible approach will be a combination of using AWS CLI with WinSCP where - to upload, move the objects into S3 using WinSCP and then use AWS CLI to change the storage class. and restore objects using AWS CLI into S3 standard bucket and then use WinSCP to transfer the files.

AWS
已回答 2 个月前
  • Hi @Mrity - Thank you for your suggestion, that might work. Would you be able to share some sample commands in AWS CLI for:

    1. Changing Storage Class
    2. Initiate RESTORE with BULK Retrieval and set the Number of days that the restored copy is available to 10 Days
0

Currently, WinSCP does not natively support initiating a restore for files stored in S3 Glacier Deep Archive directly through its GUI. WinSCP is primarily designed for file transfer protocols and does not have built-in functionality to interact with the more advanced features of AWS S3 storage classes, like Glacier Deep Archive.

To restore files from Glacier Deep Archive, you typically need to use the AWS Management Console, AWS CLI, or SDKs that support initiating a restore request.

profile picture
专家
已回答 2 个月前
  • Hi @Giovanni, Thank you for your input. This is a solid feedback. Do you happen to know if it's possible to create a script for WinSCP to trigger CLI to initiate a RESTORE?

0

For changing the Storage Class using aws cli, you could either use "aws s3 cp" or "aws s3 mv" commands. The cp command will create a new copy of the object and set the new Storage Class for it, in this case, you need to ensure that the original object is then handled appropriately. While the mv command will updat storage class of the object without duplicating the object. e.g. - aws s3 mv s3://BUCKET_NAME/OBJECT_KEY s3://BUCKET_NAME/OBJECT_KEY --storage-class STORAGE_CLASS Replace BUCKET_NAME with the name of your S3 bucket. Replace OBJECT_KEY with the path and filename of the object you want to change the storage class for. Replace STORAGE_CLASS with the desired storage class, such as STANDARD, GLACIER, DEEP_ARCHIVE, etc.

**Refer the AWS CLI documentation ** - https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/mv.html

Similarly for restoring the object, there are several methods. E.g. on aws cli - aws s3api restore-object --bucket DOC-EXAMPLE-BUCKET --key dir1/example.obj --restore-request '{"Days":10,"GlacierJobParameters":{"Tier":"Standard"}}' refer the documentation here - https://docs.aws.amazon.com/AmazonS3/latest/userguide/restoring-objects.html#restore-archived-objects https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/restore-object.html

If you are looking to perform this operation at large scale, then recommendation will be to use the S3 Lifecycle policies to automatically transition objects between storage classes, without the need to manually run the “aws s3 cp” command. This can be a more scalable and automated approach to managing your S3 storage class transitions. Also, from a restore object perspective, using S3 batch operations can be efficient as well. Refer - https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops-initiate-restore-object.html

AWS
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则