You can also try Minio client aka mc, with its open source and S3 compatible API. You can use mc mirror
command to archive the directories.
Installing the minio client:
$ wget https://dl.minio.io/client/mc/release/linux-amd64/mc
$ chmod 755 mc
$ ./mc --help
Configuring mc for Amazon S3:
$ ./mc config host add <ALIAS> <YOUR-S3-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY>
Example
$ ./mc config host add mys3 https://s3.amazonaws.com BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12
Copying the local folder to AWS S3:
$ ./mc mb mys3/mys3baucket
$ ./mc mirror mylocaldir/ mys3/mys3baucket
The first command creates a bucket named "mys3baucket". The second command mirrors the local directory to the S3 bucket by name. This can be easily set in cron
for a periodic mirror.
mc
implements the following commands:
ls List files and folders.
mb Make a bucket or folder.
cat Display contents of a file.
pipe Write contents of stdin to one or more targets. When no target is specified, it writes to stdout.
share Generate URL for sharing.
cp Copy one or more objects to a target.
mirror Mirror folders recursively from a single source to many destinations.
diff Compute differences between two folders.
rm Remove file or bucket [WARNING: Use with care].
access Manage bucket access permissions.
session Manage saved sessions of cp and mirror operations.
config Manage configuration file.
update Check for a new software update.
version Print version.
Hope it helps.
Disclaimer: I work for Minio