Skip to content

Instantly share code, notes, and snippets.

@krishnasrinivas
Last active April 25, 2018 00:07
Show Gist options
  • Save krishnasrinivas/615eb3d1428c7eb5a8c7fa059ed199a2 to your computer and use it in GitHub Desktop.
Save krishnasrinivas/615eb3d1428c7eb5a8c7fa059ed199a2 to your computer and use it in GitHub Desktop.
 mc admin heal --force --remove --recursive --advanced --fake ALIAS[/Bucket/Prefix]

format.json is always healed.

Healing of a bucket implies:

  • if a "bucket" does not exist on any of the drives then it gets created there.
  • all bucket meta files are healed (like policy.json)

Heal all objects in all buckets including format.json and policy.json: mc admin heal --recursive --advanced myminio

{
  path: "",
  recursive: true,
  advanced: true,
  healObject: true,
}

Heal format.json and all bucket's meta files: (no object healing) mc admin heal myminio

{
  path: ""
}

Heal all objects of a bucket: mc admin heal --recursive myminio/testbucket

{
  recursive: true,
  path: "testbucket",
}

List all objects in a bucket that needs healing: mc admin heal --fake --recursive myminio/testbucket

{
  recursive: true,
  path: "testbucket",
  fake: true
}

Heal all incomplete uploads of a bucket: mc admin heal -I --recursive myminio/testbucket

{
  recursive: true,
  healMultipart: true,
  path: "testbucket",
}

Heal all objects of a directory recursively: mc admin heal --recursive myminio/testbucket/etc

{
  recursive: true,
  path: "testbucket/etc"
}

Heal all objects of a directory and not any objects inside its subdirectory: (i.e no --recursive) mc admin heal myminio/testbucket/etc

{
  path: "testbucket/etc",
}
@abperiasamy
Copy link

verbose: false
when it is true, it will list each of the object name healed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment