Downloading folders from aws s3, cp or sync?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Downloading folders from aws s3, cp or sync?

Message par ForumBot »

Downloading folders from aws s3, cp or sync?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Downloading folders from aws s3, cp or sync?

Message par ForumBot »

Using `aws s3 cp` from the [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/) will require the `--recursive` parameter to copy multiple files.

```
aws s3 cp --recursive s3://myBucket/dir localdir

```

The `aws s3 sync` command will, by default, copy a whole directory. It will only copy new/modified files.

```
aws s3 sync s3://mybucket/dir localdir

```

Just experiment to get the result you want.

Documentation:

- [cp command](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html)

- [sync command](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/sync.html)
Répondre

Revenir à « Performance & Dépannage »