jueves, 23 de abril de 2020

Using Multipart Upload with CLI to send a file to Oracle Object Storage

The Oracle Cloud Infrastructure Object Storage service supports multipart uploads for more efficient and resilient uploads, especially for large objects.

With multipart uploads, individual parts of an object can be uploaded in parallel to reduce the amount of time you spend uploading. 

Multipart uploads can accommodate objects that are too large for a single upload operation. Oracle recommends that you perform a multipart upload to upload objects larger than 100 MiB. The maximum size for an uploaded object is 10 TiB. Object parts must be no larger than 50 GiB. For large uploads performed through the API, you have the flexibility of pausing between the uploads of individual parts, and resuming the upload when your schedule and resources allow.


The first step is to Install and Configure OCI CLI, you can follow the articles:


Then Upload the File using the command "oci os object put", in this example I will upload the file "C:\Users\Deiby Gomez\Documents\OracleDB12102.tar.gz" with a size of 26G, I will create parts of 1G each and upload 4 parts in parallel:

PS C:\WINDOWS\system32> oci os object put --namespace-name idt6zjv16ewi -bn ImportedVMs --file 'C:\Users\Deiby Gomez\Doc
uments\OracleDB12102.tar.gz' --name OracleDB12102 --parallel-upload-count 4 --part-size 1024
Upload ID: b1e5a160-55e0-52e6-09be-4238ac10b9c4
Split file into 26 parts for upload.
Uploading object  [------------------------------------]    0%




You can monitoring the upload by using the command "oci os multipart list":



PS C:\WINDOWS\system32> oci os multipart list --namespace-name idt6zjv16ewi -bn ImportedVMs
{
  "data": [
    {
      "bucket": "ImportedVMs",
      "namespace": "idt6zjv16ewi",
      "object": "OracleDB12102",
      "time-created": "2020-04-23T00:39:42.230000+00:00",
      "upload-id": "b1e5a160-55e0-52e6-09be-4238ac10b9c4"
    }
  ]
}
PS C:\WINDOWS\system32>




The Upload will progress much faster:


PS C:\WINDOWS\system32> oci os object put --namespace-name idt6zjv16ewi -bn ImportedVMs --file 'C:\Users\Deiby Gomez\Doc
uments\OracleDB12102.tar.gz' --name OracleDB12102 --parallel-upload-count 4 --part-size 1024
Upload ID: b1e5a160-55e0-52e6-09be-4238ac10b9c4
Split file into 26 parts for upload.
Uploading object  [#####-------------------------------]   15%  0d 21:27:16



PS C:\WINDOWS\system32> oci os object put --namespace-name idt6zjv16ewi -bn ImportedVMs --file 'C:\Users\Deiby Gomez\Doc
uments\OracleDB12102.tar.gz' --name OracleDB12102 --parallel-upload-count 4 --part-size 1024
Upload ID: b1e5a160-55e0-52e6-09be-4238ac10b9c4
Split file into 26 parts for upload.
Uploading object  [####################################100%
{
  "etag": "c527ccff-7bcf-4e95-8ead-b1c723ea95a4",
  "last-modified": "Thu, 23 Apr 2020 12:49:06 GMT",
  "opc-multipart-md5": "DRPDP2U4AhcJIUG0f2W2uw==-26"
}
PS C:\WINDOWS\system32>



Once the File is uploaded, you can check its status:




You can check the file in the web:





1 comentario:

  1. Oracle Notes From Guatemala: Using Multipart Upload With Cli To Send A File To Oracle Object Storage >>>>> Download Now

    >>>>> Download Full

    Oracle Notes From Guatemala: Using Multipart Upload With Cli To Send A File To Oracle Object Storage >>>>> Download LINK

    >>>>> Download Now

    Oracle Notes From Guatemala: Using Multipart Upload With Cli To Send A File To Oracle Object Storage >>>>> Download Full

    >>>>> Download LINK

    ResponderEliminar

Oracle ACE Director Award - Deiby Gómez

Thanks #OracleACE Program for this awesome certificate recognizing the work I have done in the community for the last year. Looking forwa...