Lyve Cloud S3 Storage Resources Guide
Lyve Cloud S3 Storage Resources 

Was this content helpful?

OPEN MENU CLOSE MENU

Data Migration with AWS CLI

The AWS CLI (Command Line Interface) tool is certified for use with Lyve Cloud.

To use the AWS CLI with Lyve Cloud you need to download and install AWS CLI on a host. You cannot use AWS CLI to move data directly from a cloud to another cloud. Before you start the migration, first download the data locally from the source cloud, and then upload the data to the Lyve cloud. 

These instructions guide you to download data locally from AWS S3 and upload it to Lyve Cloud:

  1. To access your AWS S3 buckets with the CLI, use the configure command. The configure command will bring up a series of prompts that creates the default profile.

    $ aws configure
    

  2. Enter the AWS S3 access key and secret access key.

    AWS Access Key ID [****************aa]:
    
    AWS Secret Access Key [****************aa]:
    
    Default region name [a]:
    
    Default output format [a]:
    

  3. Use the configure command to create an additional profile to access Lyve Cloud buckets

    aws configure --profile lyvecloud
    

  4. Enter Lyve Cloud's access key and secret access key.

    AWS Access Key ID [****************aa]:
    
    AWS Secret Access Key [****************aa]:
    
    Default region name [a]:
    
    Default output format [a]:
    

  5. Run the aws configure list-profiles command to see all your configured profiles.

    aws configure list-profiles
    
    default
    
    lyvecloud
    

  6. Run the command to transfer all files from the AWS bucket to the local directory:
  • mv- for moving the object(s)
  • cp- for copying the object(s)
aws s3 cp s3://<source_bucket>/ <local_directory> --recursive

Following is an example of the copy command

aws s3 cp s3://3101/ C:\222 –recursive
  1. Transfer all files from the local directory to the destination bucket at LyveCloud

    aws s3 cp <local_directory>/ 
    s3://<destination_bucket>/ --recursive --profile lyvecloud 
    --endpoint-url=https://s3.us-east-1.lyvecloud.seagate.com
    

    aws s3 cp C:\222\ s3://adi-migration/ --recursive --endpoint-url=https://s3.us-east-1.lyvecloud.seagate.com
    

Executing the command uploads all the three local files.

 Note—When listing objects using the AWS CLI S3 ls command  or S3 API list-objects command in a bucket with object immutability enabled, the output will only display the current active object version. Previous object versions will not appear using these commands.

For instance, if you have deleted an object, these commands may show the bucket as empty. To display previous versions of objects, use the following command:

$ aws --profile <YOUR RPOFILE> --endpoint https://s3.us-west-1.lyvecloud.seagate.com s3api list-object-versions --bucket <YOUR BUCKET> --prefix <PATH TO OBJECTS>

The output is in JSON format. Look at the Key and VersionID to identify objects and versions.  If you are unable to view your bucket contents with AWS list-buckets command, you must verify that your bucket has the correct permission settings. Check to verify that your permission settings apply to all buckets or use a consistent prefix for your buckets that will determine consistent permissions.