Using MinIO as a CrateDB backup repository

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.

  1. First, follow the official MinIO tutorial to install it on the platform of your choice.
  2. Create a tenant, a bucket and a user that can access your bucket. Take note of the credentials.
  3. 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.
  4. Create a new repository in your CrateDB Cluster:
      access_key = 'test', 
      secret_key = 'testsecret', 
      endpoint   = '', 
      protocol   = 'http', 
      bucket     = 'test-bucket', 
      base_path  = 'backups'
  5. CrateDB will perform a connectivity test and tell you if the bucket is reachable.
  6. 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.