Copy all files from a S3 bucket/folder to another S3 bucket/folder
s3cmd ls s3://sourcebucket/sourcefolder/ | awk '{ print $4 }' | tail -n +2 | sed -e 's!^s3://sourcebucket/sourcefolder/\([a-z0-9\_\.]*\)!s3cmd cp s3://sourcebucket/sourcefolder/\1 s3://targetbucket/targetfolder/\1!g' | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment