After setting up s3cmd and my S3 bucket, when I try this command
sudo s3cmd sync --recursive --preserve /srv s3://MyS3Bucket
I get this error:
ERROR: S3 error: 400 (InvalidRequest): The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
My s3cmd version is 1.0.0 which is installed by default after following their “deb” installation guide for by Ubuntu 12.04
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’m running it through ROOT only.
Anyting other than this that you feel could be affecting the script usage?
Another issue now is setting up cron to automate the backup script.
While the commands are working with s3cmd tool when run one by one directly from command line, however when I created a .sh script, and trying to run through cron, the script runs fine but shows below error:
ERROR: S3 error: 400 (InvalidRequest): The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
My .sh file is as follows:
#!/bin/sh
echo 'Started'
date +'%a %b %e %H:%M:$S %Z %Y'
s3cmd sync --recursive --preserve /srv s3://MyBucket
s3cmd sync --recursive --preserve /etc s3://MyBucket
s3cmd sync --recursive --preserve /home s3://MyBucket
s3cmd sync --recursive --preserve /var s3://MyBucket
dpkg --get-selections >> dpkg.list 2>&1
s3cmd sync --recursive --preserve dpkg.list s3://MyBucket
date +'%a %b %e %H:%M:$S %Z %Y'
echo 'Finished'
Any suggestions for this?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.