code-dumps/aws/s3-deep-archive-restore.sh

7 lines
179 B
Bash
Raw Normal View History

2024-07-24 09:57:48 +08:00
#!/bin/bash
BUCKET=$1
aws s3 ls s3://$BUCKET --recursive | awk '{print $NF}' | while read i; do
aws s3api restore-object --bucket $BUCKET --key $i --restore-request Days=20
done