Migrating Object Storage data with Minio Client

Minio Client Overview

Minio Client provides a modern alternative to UNIX commands like ls, cat, cp, mirror, diff etc. It is able to communicate with any S3 compatible cloud storage provider and can be used to migrate data from one region to another.

Requirements

Installing the Minio Client

1 . Connect to your server as root via SSH.

2 . Update the APT packet cache and the software already installed on the instance:

apt update && apt upgrade -y

3 . Download the Minio Client:

wget https://dl.minio.io/client/mc/release/linux-amd64/mc -P /usr/bin/

4 . Make the file executable:

chmod +x /usr/bin/mc

Configuring the Minio Client and Migrating Data

1 . Create a directory to store the configuration file of Minio client:

mkdir ~/.mc/

2 . Create a configuration file for Minio Client:

touch ~/.mc/config.json

3 . Open the file ~/.mc/config.json in a text editor, and edit it as follows:

{
	"version": "8",
	"hosts": {
		"fr-par": {
			"url": "https://s3.fr-par.scw.cloud",
			"accessKey": "<ACCESS_KEY>",
			"secretKey": "<SECRET_KEY>",
			"api": "S3v2"
		},
		"nl-ams": {
			"url": "http://s3.nl-ams.scw.cloud",
			"accessKey": "<ACCESS_KEY>",
			"secretKey": "<SECRET_KEY>",
			"api": "S3v2"
		}
  }
}

Important: Replace <ACCESS_KEY> and <SECRET_KEY> with the credentials of your API token.

3 . Start the migration of your data:

mc cp --recursive nl-ams/oldbucket/ fr-par/newbucket

The above command migrates the content from the bucket oldbucket in the region NL-AMS to the bucket newbucket in the region FR-PAR. Edit the command towards your needs before running it.

Minio Client displays a status bar during the transfer, allowing to observe the status of the migration:

Minio Client

Discover a New Cloud Experience

Deploy SSD Cloud Servers in seconds.