Duplicity bash script to restore data from S3

Restore your S3 duplicity backup

#!/bin/bash

if [ $# -lt 3 ] || [ $# -gt 3 ]; then
        echo 'invalid number of parameters passed'
        echo 'Usage: s3-restore <bucket-name> <folder-name> <output-folder>'
else
        echo 'restoring backup'
        export PASSPHRASE=your_passphrase
        export AWS_ACCESS_KEY_ID=your_aws_access_key
        export AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key

        duplicity s3://s3.amazonaws.com/$1/$2 $3
fi