Skip to content

Instantly share code, notes, and snippets.

@timoyuen
Forked from krishnasrinivas/mc-admin.md
Created April 25, 2018 00:07
Show Gist options
  • Save timoyuen/a8b0deea91a954343231440b3bdd60bd to your computer and use it in GitHub Desktop.
Save timoyuen/a8b0deea91a954343231440b3bdd60bd 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",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment