MinIO-ArvanCloud Object Storage

MinIO - ArvanCloud
MinIO - ArvanCloud


One of the most important tasks for the teams who maintain the distributed storage or object storage is to have an online and reliable backup. In this article I am using MinIO as a Distributed Object Storage and ArvanCloud Object Storage as a backup or replication site.

There are different ways through which the team can take a backup from the data, like:

1- Online Backup or Site Replication (Protect Application from main site Hardware-failure or …)
2- Offline Backup or One Way Sync (Protect Data)

Prerequisites:
- Access to you MinIO Server
- Full Access to ArvanCloud Object Storage panel or API
- Install MinIO CLI on the endpoint which wants to run the commands( In this article MinIO Server). In this link you can find how to install it
- Online Backup or Site Replication



In this article I do not mention how to setup your MinIO Server, so first of all you should sign up in ArvanCloud or Login to you account. Then follow the path.

Storage>>Buckets>>AddBucket>>Create a private bucket

After that you should enable “versioning” on that bucket (You can use ArvanCloud API or S3 Browser Software). I personally prefer using software because it is easier and you can connect to the ArvanCloud Object Storage by passing Access and Secret Keys.

ArvanCloud
ArvanCloud


So after this step we should work with the MinIO server


First Step: Set an alias for you command line to connect your MinIO server:

mcli alias set ALIAS URL ACCESSKEY SECRETKEY

Example:

mcli alias set myminio http://{IPAddress}:{Port} ACCESSKEY SECRETKEY

Second Step: Set an alias for you command line to connect ArvanCloud Object Storage server:

mcli alias set ALIAS URL ACCESSKEY SECRETKEY

Example:

mcli alias set arvancloud https://s3.ir-thr-at1.arvanstorage.com ACCESSKEY SECRETKEY

Third Step: Should config a Remote Bucket

mcli admin bucket remote add SOURCE DESTINATION --service "replication"
SOURCE:
Your local bucket
Example: myminio/localminio
DESTINATION:
Syntax: http(s)://ACCESSKEY:SECRETKEY@DESTHOSTNAME/DESTBUCKET
Example: http(s)://ACCESSKEY:SECRETKEY@https://s3.ir-thr-at1.arvanstorage.com/arbancloudminio

Final Step: Make a Replication Site

mcli replicate add --remote-bucket "OUTPUTOFSTEP3" –replicate "replicate value" myminio/mydata
Example:
mcli replicate add --remote-bucket "OUTPUTOFSTEP3" –replicate " delete,delete-marker,existing-objects" myminio/localminio

replicate value:
delete - Directs MinIO to replicate DELETE operations to the destination bucket.
delete-marker - Directs MinIO to replicate delete markers to the destination bucket.
existing-objects - Directs MinIO to replicate objects created before replication was enabled or while replication was suspended.

At this stage the configuration finished but you can track your replication and resync it with following commands

#Check the status of replicate:
mcli replicate status myminio/localminio
#Request for resync:
mcli replicate resync start --remote-bucket "OUTPUTOFSTEP3" myminio/localminio
#Check for resync status:
mcli replicate resync status --remote-bucket "OUTPUTOFSTEP3" myminio/localminio

Later I will share how you can sync your Objects with ArvanCloud Object Storage as an Offline backup