You must first install s3cmd via apt on ubuntu or via download page http://s3tools.org/download you can also clone the github project https://github.com/s3tools/s3cmd
git clone https://github.com/s3tools/s3cmd.git
If you choose to clone the github project remember to create a symlink in a directory that belongs to $PATH, like /usr/local/bin
cd s3cmd
sudo ln -s $(pwd)/s3cmd /usr/local/bin/
Then you must configure you s3cmd with you credentials
s3cmd --configure
Now, go back to the project directory and copy the variables sample file and create the real one
cp -a s3-backup-restore-variables.sample.sh s3-backup-restore-variables.sh
Edit the file and fill it out with your information