https://cloud.digitalocean.com/account/api/tokens
sudo apt-get install s3cmd
https://docs.digitalocean.com/products/spaces/resources/s3cmd/
s3cmd --configure
Config example (/home/username/.s3cfg
):
[default]
access_key = xyz
bucket_location = US
cloudfront_host = cloudfront.amazonaws.com
host_base = fra1.digitaloceanspaces.com
host_bucket = %(bucket)s.fra1.digitaloceanspaces.com
human_readable_sizes = True
simpledb_host = sdb.fra1.digitaloceanspaces.com
use_https = True
website_endpoint = http://%(bucket)s.s3-website-%(location)s.fra1.digitaloceanspaces.com/
s3cmd ls
s3cmd put some.log s3://logs/server/
s3cmd put file1.txt file2.txt path/to/file3.txt s3://spacename/path/
s3cmd get s3://spacename/file.txt newfilename.txt
s3cmd put * s3://spacename/path/ --recursive
s3cmd get s3://logs/server/some.log
s3cmd get s3://spacename/path/ --recursive
s3cmd rm s3://logs/server/some.log
s3cmd rm s3://logs/server/ --recursive --force
s3cmd del s3://logs/server
s3cmd du
s3cmd del -f -r s3://newspace/ # purge all data first
s3cmd rb s3://newspace/ # destry bucket
s3cmd sync --dry-run --delete-removed --preserve ~/demo/ s3://s3tools-demo/some/path/
More commands: https://docs.digitalocean.com/products/spaces/resources/s3cmd-usage/
s3cmd setacl s3://spacename/file.txt --acl-public
s3cmd setacl s3://spacename/path/to/files/ --acl-public --recursive