Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to use s3cmd to copy a full bucket down to my local machine like so:

s3cmd -c .s3cfg-bespoke sync s3://my_bucket/ ~/local_folder/

There are three folders and a smattering of files in the bucket. The first folder and it's contents are copied without issue, but the second folder throws an error before anything is transferred:

Problem: OSError: [Errno 21] Is a directory: '/home/me/local_folder/images/'
S3cmd:   0.9.9.91

Traceback (most recent call last):
  File "/usr/bin/s3cmd", line 1736, in <module>
    main()
  File "/usr/bin/s3cmd", line 1681, in main
    cmd_func(args)
  File "/usr/bin/s3cmd", line 1070, in cmd_sync
    return cmd_sync_remote2local(args)
  File "/usr/bin/s3cmd", line 889, in cmd_sync_remote2local
    raise e
OSError: [Errno 21] Is a directory: '/home/me/local_folder/images/'

I've tried using the --recursive switch but it doesn't affect the outcome. I've been through the manpage and no other options seem like they would help.

Am I doing something wrong in the command? Or have I stumbled across a genuine bug?

share|improve this question
add comment

1 Answer

From Amazon aws forum:

s3cmd -c .s3cfg-bespoke --rexclude "/$" sync s3://my_bucket/ ~/local_folder/
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.