I am using AWS-CLI in windows cmd and run AWS s3 sync command but it does not work with --recursive, it shows unknown options: --recursive
aws s3 sync --recursive localpath s3://bucket-name
python --version python 3.6.5
aws --version aws-cli/1.15.38 Python/2.7.9 Windows/2012Server botocore/1.10.38
Please help
Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files.
Verify that you have the permission for s3:ListBucket on the Amazon S3 buckets that you're copying objects to or from. You must have this permission to perform ListObjectsV2 actions. Note: s3:ListBucket is the name of the permission that allows a user to list the objects in a bucket.
To run the command aws s3 sync, then you need permission to s3:GetObject, s3:PutObject, and s3:ListBucket. Note: If you're using the AssumeRole API operation to access Amazon S3, you must also verify that the trust relationship is configured correctly.
It is based on aws s3 sync , which should enable an incremental backup, instead of copying/modifying every files.
The aws s3 sync
command is already recursive, so there is no need for a recursive option, and there isn't one:
Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files.
In addition the sync
command only copies things that don't already exist on the destination. If you point to a folder it will recursively sync everything inside that doesn't already exist on your target destination. This is different then the aws s3 cp
command. The cp
command copies whatever you tell it to, regardless of it it already exists on the target. The cp
command takes a --recursive
option for recursively copying folders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With