mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
allow forcibly creating metadata on buckets (#14820)
introduce x-minio-force-create environment variable to force create a bucket and its metadata as required, it is useful in some situations when bucket metadata needs recovery.
This commit is contained in:
@@ -625,6 +625,9 @@ func (c *SiteReplicationSys) MakeBucketHook(ctx context.Context, bucket string,
|
||||
if opts.VersioningEnabled {
|
||||
optsMap["versioningEnabled"] = "true"
|
||||
}
|
||||
if opts.ForceCreate {
|
||||
optsMap["forceCreate"] = "true"
|
||||
}
|
||||
|
||||
// Create bucket and enable versioning on all peers.
|
||||
makeBucketConcErr := c.concDo(
|
||||
|
||||
Reference in New Issue
Block a user