Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metadata on Minio object storage

Tags:

metadata

minio

I want to add metadata to Minio object while adding the file as object to Minio object storage using python. I am able to find accessing metadata of object stored on Minio. but there is no example of adding metadata while adding file to Minio storage.

Regards, Ritu Ranjan

like image 351
Rituranjan Routray Avatar asked Mar 12 '18 08:03

Rituranjan Routray


People also ask

How does MinIO store data?

Minio supports multiple pluggable storage backend including local disk, Kubernetes PVC, NAS and object storage provided by Public Cloud like Azure and GCP. Minio supports eraser codi ng which replicates & divides the data and spread it across multiple drives providing high availability and reliability.

What is object in MinIO?

MinIO Object Locking (“Object Retention”) enforces Write-Once Read-Many (WORM) immutability to protect versioned objects from deletion. MinIO supports both duration based object retention and indefinite Legal Hold retention.

How do I enable versioning on MinIO?

You can enable versioning using the MinIO Console, the MinIO mc CLI, or using an S3-compatible SDK. Versioning is a bucket-scoped feature. You cannot enable versioning on only a prefix or subset of objects in a bucket. Select the Buckets section of the MinIO Console to access bucket creation and management functions.

Is MinIO a database?

Feature Data Life Cycle Management & TieringMinIO offers a unique suite of features to protect data within and across clouds - both public and private. MinIO's enterprise data lifecycle management tools, including versioning, object locking and the various derivative components, satisfy many use cases.


1 Answers

Well it there is a examples at python minio client test

content_type='application/octet-stream'
metadata = {'x-amz-meta-testing': 'value'}
client.put_object(bucket_name,
                  object_name+'-metadata',
                  MB_11_reader,
                  MB_11,
                  content_type,
                  metadata)

The trick is that metadata dict should have keys in format 'x-amz-meta-youkey'

like image 137
Ivan Avatar answered Nov 05 '22 14:11

Ivan