litestream
litestream copied to clipboard
Default S3 minio config shown in the Docs page does not work on remote servers
Trying to use the default S3 file config with a minio remote server (shown here) does not work, when following the Getting Started guide.
You'll get 1 of two errors.
- The AWS Access Key Id you provided does not exist in our records
- cannot lookup region the aws access key you provided does not exist in our records
Also when using the file config make sure to cleanup any env variable (Litestream & AWS) that has been exported so that the file config is honored, since seems like env variables take precedence over the file.
The correct config that works with a remote Minio instance with S3 config is as follows ->
Note: you need to create an access_key_id
and secret_access_key
in the Minio console.
# AWS S3 or Minio or Compatible object storage credentials
access-key-id: <your_access_key>
secret-access-key: <your_secret>
dbs:
- path: /home/litestream/my_local_db_bath.sqlite
replicas:
- name: s3_replica
type: s3
bucket: mybkt
path: mydb # the path in the bucket
endpoint: https://minio.example.com
region: us-east-1
access-key-id: <you_can_also_add_it_here>
secret-access-key: <same_can_be_per_replica_config>