Hi Techrunnr, this post is regarding copy the contents of s3 bucket to another using aws cli, let’s say we have some contents in bucket1, we want to take daily basis backup to another bucket and we want to maintain a directory structure as month and day basis, so here we go
- AWS CLI installed
- AWS Access key and secret key and your account should be able to access both the bucket
- Login to aws account using below commands:
- We will create folder with today’s date in the script save the contents to day directory on our system, we copy this contents to another bucket
- Now copy the source bucket contents to another bucket on monthly and daily basis (/month/day format), use below script
- Check copied or not
© 2019, Techrunnr. All rights reserved.