Perform MySQL backup and recovery using Percona XtraBackup

domain: percona-xtrabackup · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Take a hot full backup: xtrabackup --backup --target-dir=/backup/full --user=backupuser (store the password in a my.cnf [client] section or use --defaults-extra-file, never pass it on the command line)
  2. After the backup completes, prepare it to make it consistent: xtrabackup --prepare --target-dir=/backup/full
  3. For incremental backups: xtrabackup --backup --target-dir=/backup/inc1 --incremental-basedir=/backup/full
  4. Prepare incrementals by first preparing the base with --apply-log-only, then applying each incremental: xtrabackup --prepare --apply-log-only --target-dir=/backup/full --incremental-dir=/backup/inc1; omit --apply-log-only on the final prepare step
  5. To restore: stop MySQL, clear the data directory, copy the prepared backup: xtrabackup --copy-back --target-dir=/backup/full, fix ownership (chown -R mysql:mysql /var/lib/mysql), then start MySQL
  6. Verify backup success by checking the xtrabackup_checkpoints file in the target directory and testing a restore in a staging environment regularly

Known gotchas

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans