MinIO is a popular s3-compatible storage server, that can also be used as a CrateDB backup repository.
Configuring MinIO for your backups is generally as straightforward as AWS S3, except for a couple of small details.
- First, follow the official MinIO tutorial to install it on the platform of your choice.
- Create a tenant, a bucket and a user that can access your bucket. Take note of the credentials.
- For CrateDB to access MinIO correctly, you must have bucketDns enabled (your bucket must be reachable via DNS). If that is not possible in your setup, you can fall back and use the IP address of your MinIO server instead.
- Create a new repository in your CrateDB Cluster:
CREATE REPOSITORY minio TYPE s3 WITH ( access_key = 'test', secret_key = 'testsecret', endpoint = '10.1.3.7', protocol = 'http', bucket = 'test-bucket', base_path = 'backups' );
- CrateDB will perform a connectivity test and tell you if the bucket is reachable.
- Create a new snapshot by running:
CREATE SNAPSHOT minio.testbackup ALL WITH (wait_for_completion = true);
Note: if you want to use https to perform backups, then bucketDns must be enabled and your MinIO server must have a valid SSL certificate.