Amazon AWS S3 云服务存储命令备份

命令记录

704 pip install awscli
705 aws
706 aws --version
707 aws ecr get-login-password --region us-east-1
708 aws configure
723 aws s3 sync s3://game-assert/patch /root/oss
731 aws s3 sync s3://game-assert/patch /root/oss
733 aws s3 sync s3://game-assert/patch /root/oss
734 aws s3 cp path_1003.zip s3://game-assert/patch/acgnchainEnP/64/

  107  echo "TWhESxu>VMsV)mkFHQjT"  | /opt/venv/bin/aws s3 sync   s3://game-assert/patch  /home/centos/data/blaze/patch
  108  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 sync   s3://game-assert/patch  /home/centos/data/blaze/patch
  124  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws --version
  125  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws --help
  126  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3help
  127  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 help
  129  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 --help
  130  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 help
  132  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 /home/centos/data/blaze/patch/1.txt
  133  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls /home/centos/data/blaze/patch/
  134  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch
  135  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/
  136  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 website s3://game-assert/patch/
  137  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/
  138  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 rm s3://game-assert/patch/.1.txt.swp
  139  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/
  140  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 tree s3://game-assert/patch/
  144  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 rm s3://game-assert/patch/.1.txt.swp
  151  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/acgnchainEnP
  152  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/acgnchainEnP/
  153  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/acgnchainEnP/readme.txt
  154  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 rm s3://game-assert/patch/acgnchainEnP/readme.txt
  155  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 ls s3://game-assert/patch/
  156  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 rm s3://game-assert/patch/1.txt
  167  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3  ls s3://game-assert/patch 
  168  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3  ls s3://game-assert/patch/
  172  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 sync    /home/centos/data/blaze/patch    s3://game-assert/patch
  174  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3  ls s3://game-assert/patch/
  178  echo "TWhESxu>VMsV)mkFHQjT"  |  sudo /opt/venv/bin/aws s3 sync   help

 

将密码以参数形式追加到脚本
使用管道:
echo [password] | sudo -S sh xxx.sh
echo "123456" | sudo -S sh start.sh

 

posted @ 2022-06-15 11:57  会飞的斧头  阅读(223)  评论(0编辑  收藏  举报