S3cmd restore recursive not working right

amazon s3amazon-glaciers3cmd

I am running the following command to restore the data from Amazon S3 to the web server.
s3cmd restore --recursive s3://my-bucket/Weekly-Sunday/dbexports/
and getting this error:

Restore is not allowed, as object's storage class is not GLACIER
On the other hand when I tried –dry-run it didn't show problems.

I am using amazon s3, but not GLACIER and this command to sync:

s3cmd sync LOCAL_DIR s3://my-bucket/Weekly-Sunday/dbexports/ to move data to Amazon s3.

Best Answer

The answer was very simple. The restore option is meant only for Glacier storage: (http://s3tools.org/usage) This little command with inverted parameters would do the job.

s3cmd sync s3://my-bucket/Weekly-Sunday/dbexports/ LOCAL_DIR