vitessio/vitess · critical

clone execution failed: %v

Error message

clone execution failed: %v

What it means

The MySQL CLONE plugin operation executed by the clone executor failed. ExecuteClone waits for mysqld restart and for performance_schema to report clone success; any failure/timeout there is wrapped as 'clone execution failed'.

Source

Thrown at go/vt/mysqlctl/clone.go:131

		return replication.Position{}, errors.New("clone user not configured; set --db-clone-user flag")
	}

	// Create the clone executor.
	executor := &CloneExecutor{
		DonorHost:     donorTablet.MysqlHostname,
		DonorPort:     int(donorTablet.MysqlPort),
		DonorUser:     cloneConfig.User,
		DonorPassword: cloneConfig.Password,
		UseSSL:        cloneConfig.UseSSL,
	}

	log.Info(fmt.Sprintf("Clone executor configured for donor %s:%d", executor.DonorHost, executor.DonorPort))

	// Execute the clone operation.
	// Note: ExecuteClone will wait for mysqld to restart and for the CLONE plugin to report successful completion
	// success via performance_schema before returning.
	if err := executor.ExecuteClone(ctx, mysqld, mycnf, cloneRestartWaitTimeout); err != nil {
		return replication.Position{}, fmt.Errorf("clone execution failed: %v", err)
	}

	// After CLONE, keep going across the expected mysqld restart.
	ctx, cancel := context.WithTimeout(ctx, clonePrimaryPositionTimeout)
	defer cancel()

	pos, err := mysqld.PrimaryPosition(ctx)
	if err != nil {
		return replication.Position{}, fmt.Errorf("failed to get position after clone: %v", err)
	}

	log.Info(fmt.Sprintf("Clone completed successfully at position %v", pos))
	return pos, nil
}

// CloneExecutor handles MySQL CLONE REMOTE operations for backup and replica provisioning.
// It executes CLONE INSTANCE FROM on the recipient to clone data from a donor.
type CloneExecutor struct {

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Inspect the wrapped inner error and mysqld/vttablet logs for the root cause.
  2. Verify the CLONE plugin is installed on donor and recipient (`INSTALL PLUGIN clone SONAME 'mysql_clone.so'`).
  3. Verify clone user privileges (BACKUP_ADMIN on donor, CLONE_ADMIN on recipient) and --db-clone-user settings.
  4. Check network connectivity from recipient to donor host:port and disk space on the recipient.
  5. Increase the clone restart/completion timeout for large datasets and retry.
Defensive patterns

Strategy: retry

Validate before calling

// pre-checks
// 1) plugin installed: SELECT PLUGIN_NAME FROM information_schema.PLUGINS WHERE PLUGIN_NAME='clone';
// 2) grants: donor BACKUP_ADMIN, recipient CLONE_ADMIN
// 3) connectivity: nc -z donorHost donorPort

Try / catch

if err != nil && strings.Contains(err.Error(), "clone execution failed") {
	log.Error("clone failed", slog.Any("error", err))
	// inspect mysqld logs, fix root cause, then retry CloneFromDonor
}

Prevention

When it happens

Trigger: CloneFromDonor where the donor rejects the clone (wrong credentials/user privileges), network failure between donor and recipient, CLONE plugin not installed, insufficient disk space, or timeout waiting for clone completion (cloneRestartWaitTimeout).

Common situations: Missing CLONE_ADMIN/BACKUP_ADMIN grants for clone user, firewall blocking donor:port, MySQL < 8.0.17 lacking CLONE plugin, large dataset exceeding timeout, mysqld failing to restart after clone.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/d6de8031f23fd740. Report an issue: GitHub.