amazon web services - Copy all files from S3 to ESB drive -


is there way how copy files s3 ebs drive belonging ec2 instance (which may belong a different aws account s3)?

we performing migration of whole account , upgrading instances t1 t2 type , backup data s3 somewhere outside s3 (and glacier since glacier closely linked s3) in case goes wrong , lose data.

i found articles , docs talking ebs snapshots not sure if s3 data can copied ebs (in other way manually).

according this docs, can ssh instance , copy data s3 buckets local ebs drive, have specify name of bucket. there way how copy buckets there?

aws s3 sync s3://mybucket 

i achieve this:

pseudocode:

for each bucket    aws s3 sync s3://bucketname bucketname endfor 

is there way how using aws cli?

i agree rdp-cloud's answer, if insist on creating ebs backups, answer question - there no single aws cli command sync available buckets in 1 go. can use bash script list of available buckets , sync looping through them:

#!/bin/bash  buckets=($(aws s3 ls | awk '{print $3}'))  (( i=0; i<${#buckets[@]}; i++ ))   aws s3 sync s3://$buckets[$i] <destination> done 

make sure test aws s3 ls | awk '{print $3}' gives exact list intend sync before running above.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -