Screenshot 2021-08-19 at 13.36.02.png

Juan Herrera Utande - 2021/08/19

Longhorn is an OpenSource rock solid container native storage solution created by Rancher and donated to the CNCF. One of its key features is the full support for volume backups as it implements the CSI volume snapshot API. Longhorn includes native support to use S3 or NFS external storage systems as backup targets.

The backup functionality is not limited to S3/NFS. Third party backup tools that can access the Kubernetes API and manage volume snapshots can be easily integrated with Longhorn for a failure-prof storage architecture but we'll just focus here on the functionality bundled in Longhorn.

We'll not cover how to install MinIO and Longhorn (links to the install guides are available in the Resources section) to concentrate on how to properly configure MinIO to be used as the backup target using the S3 protocol.

Environment used for the deployment:

We'll create a dedicated user and bucket for those backups using MinIO's command line tool "mc".

Let's start configuring the mc alias needed to access our Minio installation located on https://miniolab.rancher.one and, then, we'll create all the required objects: bucket, folder, user and access policy.

#mc alias for Minio Root user
mc alias set myminio [h](<http://192.168.1.51/>)ttps://miniolab.rancher.one miniorootuser miniorootuserpassword

#Bucket and folder
mc mb myminio/**rancherbackups**
mc mb myminio/rancherbackups/**longhorn**

The final step in the Minio side is to create the user that we will to access that bucket and also define the proper permissions so the access is limited only to that bucket end the objects container in it.