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)
After the backup completes, prepare it to make it consistent: xtrabackup --prepare --target-dir=/backup/full
For incremental backups: xtrabackup --backup --target-dir=/backup/inc1 --incremental-basedir=/backup/full
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
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
Verify backup success by checking the xtrabackup_checkpoints file in the target directory and testing a restore in a staging environment regularly
Known gotchas
Combining partial backups with subsequent incremental backups is not supported by Percona XtraBackup — plan a strategy that uses only full + incremental chains
--apply-log-only must be used when preparing all incremental layers except the very last; omitting it or adding it to the final prepare corrupts the backup's transaction state
XtraBackup 8.0 is required for MySQL 8.0 backups; versions must match — do not use XtraBackup 2.4 against a MySQL 8.0 server
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp