Upload Data

Create a storage bucket in your Oracle Cloud Infrastructure tenancy.

Prepare Object Storage for Integration

You must create a container, or bucket, to store data objects in Oracle Cloud Infrastructure Object Storage.

  1. Navigate to your Oracle Cloud Infrastructure Object Storage console.
  2. Click Storage and then click Object Storage.
  3. Click Create Bucket.
  4. Give your bucket a name that identifies the data, such as salesdb-bucket.
  5. Click Standard as the storage tier.
  6. If you want Oracle Cloud Infrastructure to manage your encryption keys, click Encrypt Using Oracle-Managed Keys for encryption. If you want leverage your own keys, click Encrypt Using Customer-Managed Keys.
  7. Click Create Bucket.

Upload Data Files to Storage

Upload data files from your local system to the object storage bucket you created earlier.

You can use the Console to upload files 2 GB or smaller.

  1. From the Object Storage Details screen, click the bucket name to view its details.
  2. Click Upload Objects.
  3. Select the object or objects to upload in one of two ways:
    • Drag files from your computer into the Drop files here ... section.
    • Click the select files link to display a file selection dialog box.

    As you select files to upload, they are displayed in a scrolling list. If you decide that you do not want to upload a file that you have selected, click the X icon to the right of the file name.

    If selected files to upload and files already stored in the bucket have the same name, messages warning you of an overwrite are displayed.

  4. In the Object name prefix field, optionally specify a file name prefix for the file that you have selected to upload.
  5. Click Upload Objects.

    The selected objects are uploaded and displayed in the list of objects in the bucket.

Upload Large Files to Data Storage

Upload data files larger than 2 GB from your local system to an object storage bucket using the command line interface (CLI).

When you use the command line interface, you specify the part size of your choice, and Oracle Cloud Infrastructure Object Storage splits the object into parts and performs the upload of all parts automatically. You can choose to set the maximum number of parts that can be uploaded in parallel. By default, the CLI limits the number of parts that can be uploaded in parallel to three. When using the CLI, you do not have to perform a commit when the upload is complete.

Open a command prompt and enter a command similar to the following:

oci os object put -ns <object_storage_namespace> -bn <bucket_name> --file <file_path> --name <object_name> --part-size <upload_part_size_in_MiB> --parallel-upload-count <maximum_number_parallel_uploads>

Set the following parameter and flag values:

  • <object_storage_namespace>: The top-level namespace used for the request. If not provided, this parameter will be obtained internally using a call to oci os ns get.
  • <bucket_name>: The name of the storage bucket.
  • <file_path>: The complete file path including the file name.
  • <object_name>: The name of the object. The default value is the file name excluding the path.
  • <upload_part_size_in_MiB>: The size of each multipart in mibibytes (MiB).
  • <maximum_number_parallel_uploads>: The maximum number of parts that can be uploaded in parallel. The default is 3.