Why does my AWS command work when I run it but doesn't work in root's crontab?

I am trying to sync a backup folder to AWS S3, so I run:

sudo aws s3 sync --delete /var/backup/ s3://ssw-backup-bucket

It asks my ubuntu password and works fine. But if I add it to sudo crontab-e it doesn't sync.

Any ideas?

Thanks!

5 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like