# Migrate from AWS s3 storage to NeevCloud s3 storage

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Select any Linux operating system to perform these processes.

We have chosen the operating system **Ubuntu 22.04**

Launch the [Instance](https://docs.neevcloud.com/neevcloud-products/computes/getting-started-launch-vms).

## Setup AWS

For AWS Configuration:

Click on the AWS Console Login

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F8Wyzs3JnXKpM8QnCCyKd%2Fimage.png?alt=media&#x26;token=7f330765-fbd0-47a8-98cd-d686444b0842" alt=""><figcaption></figcaption></figure>

### Create a bucket in AWS s3 storage

After logging in to AWS, search for S3 storage service and create a bucket.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FzKhxUPJoTnoPJ7UEIn3c%2Fimage.png?alt=media&#x26;token=33d2d2c9-8a7f-499a-bd4b-409971a5e310" alt=""><figcaption></figcaption></figure>

### To set bucket policy and permission

After creating the bucket apply bucket permission and bucket policy

Click on the created bucket > Permission > Bucket Policy > Edit

Update this policy type to allow modifications to the bucket name, user name, and user account ID in this section.

{% hint style="info" %}
When applying a bucket policy, ensure you customize the values based on your requirements. Do not copy this policy directly.
{% endhint %}

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FNg9IgpT89JKZq9JI2WJH%2Fimage.png?alt=media&#x26;token=b0dc35ce-6f04-4a06-9364-99b8cf69b86b" alt=""><figcaption></figcaption></figure>

### To create Access and secret key

AWS Access & Secret Key Pair navigate to the user section&#x20;

Search for the IAM service and select the existing user to create an access and secret key. If the user does not exist, create the user and assign administrator access permissions.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FInAxPzr94YhZXM2ODNcL%2Fimage.png?alt=media&#x26;token=51994e84-fbcb-4fcb-8bec-636b79f36895" alt=""><figcaption></figcaption></figure>

Verify the user's permission to access the S3 buckets.

To create the Access and Secret Key, go to Security Credentials.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FqQo1T426urjW3ePWMVyy%2Fimage.png?alt=media&#x26;token=021e9795-44bb-47b7-a946-950513721a96" alt=""><figcaption></figcaption></figure>

Security Credentials > Access Keys > Create New Access Key > Select 'Create access key for third-party service.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2Ft73Tm7if5AzuI4OlbV9u%2Fimage.png?alt=media&#x26;token=e74fd6b3-24d9-4d16-bf4e-ce6d0b678157" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FqRLqDbxRmPjFWEqThoxB%2FScreenshot%202024-08-03%20180149.png?alt=media&#x26;token=c08b7103-fcb6-4d20-a5a3-ea08f010f96d" alt=""><figcaption></figcaption></figure>

Before clicking on "Done," first copy the access and secret keys to your notepad.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2Fp9EZYCJsZSw8nXqCCii3%2Fimage.png?alt=media&#x26;token=dda44370-995f-4eef-be95-fd916af8e42c" alt=""><figcaption></figcaption></figure>

After performing these processes in AWS, configure the NeevCloud settings.

## Setup NeevCloud

Click on the Neevcloud [**login page.**](https://auth.neevcloud.com/realms/clients/protocol/openid-connect/auth?client_id=neevcloud-ui\&redirect_uri=https://my.neevcloud.com/login\&response_type=code\&state=16d24668-3348-463c-8a25-7aeaf08e0b2a\&scope=openid%20profile%20email%20offline_access\&code_challenge=j5Tz4sDlN1fUkOXBD1oV-9i5RL-4O-HoabHq4aV3PDk\&code_challenge_method=S256)

Neevcloud Bucket - See our [Bucket Creation Guide](https://docs.neevcloud.com/neevcloud-products/storage/object-storage/create-bucket)

Neevcloud Access & Secret Key Pair - See our [Access Keys Guide](https://docs.neevcloud.com/neevcloud-products/access-details/s3-ec2-credentials/create-s3-ec2-credentials)

For more information [**Neevcloud**](https://www.neevcloud.com/)

## **Guide to Move Data from AWS to NeevCloud.**

We used Ubuntu 22.04 as the mediator to facilitate the data migration from AWS S3 to NeevCloud S3.

For example, on a **Ubuntu 22.04** system.

### The first process for AWS

Update && Upgrade the systems.

```
sudo apt-get update -y
sudo apt-get upgrade -y
```

{% hint style="info" %}
For migrating data from AWS to Neevcloud, use **rclone**
{% endhint %}

### Install the configure the rclone

Install and configure the **rclone**.

```
sudo apt-get install rclone -y
```

To configure rclone for **AWS**, and then configure it in **Neevcloud.**

Run the following command to configure ' **rclone** ':

```
sudo rclone config
```

When you run the command above, follow these steps:

Choose 'n' to create a new remote&#x20;

Name: AWS  (Give the name of the remote)

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F5HhrnMCT8if98AYrkFMC%2Fimage.png?alt=media&#x26;token=0913f8ca-31c1-45b6-ac72-814480f24382" alt=""><figcaption></figcaption></figure>

Type of storage to configure to **Choose '4' for Aws s3 compliant storage provider**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FrlmHAFzN8fDbVjHea0HE%2Fimage.png?alt=media&#x26;token=e902af22-85c5-4ceb-81f1-d1702992e67e" alt=""><figcaption></figcaption></figure>

Choose your S3 provider to **Choose '1' AWS s3**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FWXGeqTVPuABxyEVII1S0%2Fimage.png?alt=media&#x26;token=7b374598-307e-4492-8527-fd59a2c7539a" alt=""><figcaption></figcaption></figure>

Get AWS credentials from runtime (environment variables or EC2/ECS metadata if no env vars). This only applies if access\_key\_id and secret\_access\_key are blank. Enter a boolean value (true or false). Press Enter for the default ("false"). Choose a number from below, or type in your value

env\_auth: true

Access & Secret key - We have created the above in the AWS section

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FUd3BDudyW2Hu9Vu0uapH%2Fimage.png?alt=media&#x26;token=e49a0a1d-4a3a-4565-a276-7ea1cf5c70b5" alt=""><figcaption></figcaption></figure>

**EndPoint:** Select  According to region, we have used the Mumbai region ( **s3.ap-south-1.amazonaws.com** )

Region to connect to. Enter a string value. Choose a number from below, or type in your value

Choose '17' to Asia Pacific(Mumbai)

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F7Z9nDLrAiy3wemJX4OIe%2Fimage.png?alt=media&#x26;token=219f850d-0102-451b-91f6-30b4b8103cda" alt=""><figcaption></figcaption></figure>

Endpoint for S3 API. Leave blank if using AWS to use the default endpoint for the region. Enter a string value. Endpoint> **s3.ap-south-1.amazonaws.com**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FpaAKaRoN5jcPhi0GNOwW%2Fimage.png?alt=media&#x26;token=0df27ea4-615d-4010-8b22-b9784075806b" alt=""><figcaption></figcaption></figure>

Select the default value press enter, then change only the storage class to choose '2'.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FkieKqBOOGRlu3WlvqGZF%2Fimage.png?alt=media&#x26;token=151bb5e2-4a7f-44aa-acbf-adbe808c7874" alt=""><figcaption></figcaption></figure>

Note that this ACL is applied only when creating buckets to choose '4' and set to all default to press Enter.

After completing these processes, simply press Enter at each step.

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2Fbfzw0NCYBnXScxDUGuWA%2Fimage.png?alt=media&#x26;token=a4193da4-a9b4-4259-9787-228ff534fd33" alt=""><figcaption></figcaption></figure>

This is the remote configuration completed after following these steps:

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FUOmv3e6KMM6Lg9BGNvDD%2Fimage.png?alt=media&#x26;token=2cbce4cd-895a-4383-80b2-01c937c9f8ae" alt=""><figcaption></figcaption></figure>

### Second Process Neevcloud

The same process is now being applied to **Neevcloud**.

Choose 'n' to create a new remote.

Name it 'Neevcloud'

Choose '4' for S3 Compliant Storage Provider

Choose'13' for S3 compatible provider

env\_auth : true

Access & Secret Key - See our [Access Keys Guide](https://docs.neevcloud.com/neevcloud-products/access-details/s3-ec2-credentials/create-s3-ec2-credentials)

EndPoint: **s3-api.neevcloud.com**

Once you have applied the same process, see Configure the details for **Neevcloud.**

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FCL8t8G0UmDETlK9TQJ1o%2Fimage.png?alt=media&#x26;token=9b8098be-b033-452d-b86d-37643a53d3a3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Ensure you have created buckets in both **AWS** and **Neevcloud** before running these commands.
{% endhint %}

Now complete the configuration to run these commands.

```
sudo rclone move AWS:(aws_bucket_name) Neevcloud:(neevcloud_bucket_name)  --progress
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2F8TiRu8BlRmYdMJ4fk5V3%2Fimage.png?alt=media&#x26;token=b2d29124-f95e-4495-8ba0-38227d8a6ae3" alt=""><figcaption></figcaption></figure>

Now, return to both AWS and Neevcloud to check the status of buckets and details of the data.
