部署AWS CLI客户端
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install
查看版本
[centos@us-prod-sre-jumpserver-1 ~]$ aws --version aws-cli/2.7.16 Python/3.9.11 Linux/3.10.0-1127.13.1.el7.x86_64 exe/x86_64.centos.7 prompt/off
aws configure 快速配置
[centos@us-prod-sre-jumpserver-1 ~]$ aws configure AWS Access Key ID [None]: AKIA3TT6dsdfsdfdsM7A7T6RYFYe124Dqweqw AWS Secret Access Key [None]: Bt+XxqOZF3cSwVdssdfqEdCkvMT3eVyp+GACBwZxiMJZXJJ/ Default region name [None]: us-west-1 Default output format [None]: json
配置迁移脚本,记录脚本运行时间并打印输出日志
#!/bin/bash mkdir sync_files (time aws s3 sync s3://media.pplingo.com/lingorecordings/ s3://priv.cdn.lingoace.com/signed/lingorecordings/ > ./sync_files/3.sync_output.log &) >> ./sync_files/3.time.log 2>&1
官方参考地址
https://aws.amazon.com/cn/premiumsupport/knowledge-center/move-objects-s3-bucket/
继续阅读
评论