Connect, and check each step.
Five checks, in order, with the AWS CLI. Each shows the command, what you should see, and what to do if you don’t.
Your shell has the key
Run this
export AWS_ACCESS_KEY_ID=<access-key-id> export AWS_SECRET_ACCESS_KEY=<secret> export AWS_DEFAULT_REGION=us-east-1You should see
Nothing. These lines print no output.
If you don’t
No key yet
In the console, open Keys and create an application key scoped to
Open the consoleclinic-backups.Your key can write
Run this
echo "hello world" > hello.txt aws --endpoint-url https://s3.amanahcloud.bh \ s3 cp ./hello.txt s3://clinic-backups/You should see
upload: ./hello.txt to s3://clinic-backups/hello.txtIf you don’t
SignatureDoesNotMatchThe secret or the region is wrong. The region is
us-east-1.A checksum error
Run this line, then the command again.
export AWS_REQUEST_ CHECKSUM_ CALCULATION= when_ required The file is there
Run this
aws --endpoint-url https://s3.amanahcloud.bh \ s3 ls s3://clinic-backups/You should see
<date> <time> 12 hello.txtIf you don’t
AccessDeniedThe key is scoped to another bucket, or it cannot list. Check it under Keys.
You can read it back
Run this
aws --endpoint-url https://s3.amanahcloud.bh \ s3 cp s3://clinic-backups/hello.txt ./back.txtYou should see
download: s3://clinic-backups/hello.txt to ./back.txtIf you don’t
A checksum warning
Run this line, then the command again.
export AWS_RESPONSE_ CHECKSUM_ VALIDATION= when_ required The first real backup
Run this
aws --endpoint-url https://s3.amanahcloud.bh \ s3 sync /srv/backups \ s3://clinic-backups/backups/You should see
One
upload:line for each file, then your prompt again.If you don’t
It stops part-way
Run the same command again.
syncsends only what is missing.
The values every client asks for
The region is a label S3 tools expect, not a place. Your data is stored in Bahrain.
- Endpoint
https://s3.amanahcloud.bh- Region
us-east-1- Signing
- AWS Signature V4
- Addressing
- Path-style or virtual-hosted
- Keys
- One per bucket, from Keys in the console
Settings for other tools
The checks use the AWS CLI. rclone and restic take the same values, filled in here with your bucket and folder.
rclone
Add this to rclone’s config file, ~/.config/rclone/rclone.conf.
[amanah]
type = s3
provider = Other
access_key_id = <access-key-id>
secret_access_key = <secret>
endpoint = https://s3.amanahcloud.bh
region = us-east-1Then run the first sync.
rclone sync /srv/backups amanah:clinic-backups/backupsrestic
Uses the three variables from check 1. restic init asks you to choose a repository password.
export RESTIC_REPOSITORY=\
s3:https://s3.amanahcloud.bh/clinic-backups/restic
restic init
restic backup /srv/backups| Veeam Backup & Replication, Synology Hyper Backup, Duplicati | Choose the S3-compatible option, then enter the endpoint, the region and your key. |
|---|---|
| AWS SDKs | Set the endpoint URL and the region in the client, and sign with your key. |
What the API does today
Watad is not a full copy of S3. This is what is there, where you set it, and what is not offered.
Works today
- Put, get, delete and copy, with metadata
- Multipart upload
- Listing with prefix, delimiter and paging
- Presigned URLs for GET and PUT
Set in the console
- Keys scoped to one bucket
- Versioning and lifecycle rules
- CORS for a bucket
- Public-read policy
- Share links, organisations and roles
Not offered
- Retention locks and legal hold
- Encryption at rest by default
- Replication
- S3 ACLs, IAM and STS
- Bucket notifications
- Single sign-on
Stuck on a check?
Tell us which one and what you saw. A person will reply.
