Skip to content

Instantly share code, notes, and snippets.

@poornas
Last active Jun 20, 2022
Embed
What would you like to do?
metadata backup and recovery

Metadata backup and recovery for DR

MinIO extension APIs for backup and recovery of metadata exist for

  • Backup and Restore of all bucket metadata
  • Backup and Restore of all IAM users, policies and groups

Bucket metadata export

Required permission: admin:ExportBucketMetadata

Export metadata for mybucket from myminio into a zip file

mc admin cluster bucket export myminio/mybucket

Export bucket metadata for entire site

mc admin cluster bucket export myminio

Bucket metadata import

Required permission: admin:ImportBucketMetadata Create a bucket if missing on site2 and apply all the metadata in the zip file created previously on myminio with mc admin cluster export cmd.

Import metadata for mybucketinto myminio using metadata from bucket1 as a template

mc admin cluster bucket import site2/mybucket bucket1-metadata.zip

Import bucket metadata for entire site

This will create buckets with proper versioning or object lock configuration and import all metadata settings using the zip file from prev. export command.

mc admin cluster bucket import site2 allbuckets-metadata.zip

IAM data export

Required permission: admin:ExportIAM

Export metadata for all users, policies and groups from myminio into a zip file

mc admin cluster iam export myminio

IAM data import

Required permission: admin:ImportIAM Using previously exported iam metadata from myminio, recreate all users, policies, groups and mappings on site2

Import IAM data into site2 using exported zip from myminio

mc admin cluster iam import site2 myminio-iam-info.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment