code-dumps/aws/s3-deep-archive-restore.sh
2024-07-24 09:57:48 +08:00

7 lines
179 B
Bash

#!/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