mc table replicate resync rebuild

The mc table replicate resync rebuild command rebuilds the new replica’s catalog so it converges on the new primary.

This is phase two of the post-failover catalog resync. Run it against the site you are demoting to be the new replica, which is the old primary, after mc table replicate resync open and after the site replication resync from the new primary has completed.

The command backs up and deletes the local catalog, then runs one scan cycle that cross-checks every table and view against the new primary before accepting it. Versions that exist only on this site are discarded, and their data files are retained on disk for manual recovery. On success, this site becomes a fully fledged replica.

The command is rejected while the new primary still reports an in-progress site replication resync, so confirm that has finished first. The new primary must stay reachable for the whole scan. If it becomes unreachable, the rebuild aborts and leaves the catalog cleared until it is run again successfully. A timestamped backup of the previous catalog is always retained.

The command returns immediately. The backup, delete, and rebuild happen asynchronously during the next catalog scanner cycle.

This command backs up and deletes the local catalog, discarding writes that exist only on this site. The command prompts for confirmation before proceeding. Pass --yes to skip the prompt in automation.

Parameters

ALIAS

Required

The alias of the old primary MinIO AIStor cluster to demote.

--yes

Alias: -y

Optional

Skip the confirmation prompt. Use this flag to run the command without interactive confirmation, for example in automation.

Global flags

This command supports any of the global flags.

Examples

Rebuild the catalog on the old primary

mc table replicate resync rebuild myoldprimary

Rebuild without the confirmation prompt

mc table replicate resync rebuild --yes myoldprimary