mc admin cluster bucket import
The mc admin cluster bucket import command imports bucket metadata as created by the mc admin cluster bucket export command.
You can use this command to manually restore the metadata to the specified bucket on a MinIO AIStor deployment.
The import does not restore all bucket settings:
- It does not import bucket replication configuration. Configure replication again after the import.
- It imports only the default retention settings for object locking. Object locking must have been enabled when the bucket was created.
- Lifecycle rules that transition objects need the remote tier to exist on the target deployment.
If you specify only the deployment as the target, this command applies the metadata objects to all matching buckets on the target.
Syntax
The following command imports bucket metadata for the myaistor deployment from a file:
mc admin cluster bucket import myaistor /path/to/myaistor-bucket-metadata.zipThe command has the following syntax:
mc [GLOBALFLAGS] admin cluster bucket import \
ALIAS[/BUCKET] \
METADATA.ZIP- Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
ALIAS
Required
The alias of the MinIO AIStor deployment.
METADATA.ZIP
Required
The path to the metadata file to import.
Use mc admin cluster bucket export to export bucket metadata for use with this command.
BUCKET
Optional
The bucket to apply the imported metadata to.
Global Flags
This command supports any of the global flags.