October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Create Hot MySQL Backups with Percona XtraBackup

A production-safe XtraBackup workflow keeps MySQL online during the copy, then prepares, restores, re-owns, and validates the files. This guide covers compatibility limits, incremental and partial backups, streaming encryption, off-site storage, and recovery drills.
Length12 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Percona XtraBackup can copy a physical MySQL backup while the source server continues serving traffic. The safe sequence is backup, prepare, restore, correct ownership, and validate. Compatibility must be checked first: the current XtraBackup 8.4 documentation requires databases created with the 8.4 series or later and does not support MySQL 8.0 or 9.x servers.

What a hot XtraBackup actually does

A hot backup is taken while the MySQL-compatible server remains available. XtraBackup copies the physical data files and uses a log-copying thread to collect transactional log records generated while those files are being copied. Because individual files are read at different moments, the copied directory is not immediately a consistent restore image. The later --prepare phase applies redo and performs crash recovery so the files represent one recoverable point in time.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is different from taking the server offline and copying its data directory. It is also different from a logical export, where database contents are represented in a logical format. Physical backups can restore faster than logical techniques such as mysqldump, according to MySQL documentation, but the physical approach brings stricter version, filesystem, ownership, and restore-order requirements.

Check compatibility before you copy anything

Do not start with the backup command. Match the XtraBackup release to the server family and the database version first. The XtraBackup 8.4 quickstart identifies these supported server families:

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Compatibility area Requirement in the XtraBackup 8.4 documentation
Server families MySQL Server, Percona Server for MySQL, and Percona XtraDB Cluster
Database version gate Databases created with the 8.4 series or later
Unsupported server versions MySQL 8.0 and MySQL 9.x
Supported storage engines InnoDB, XtraDB, MyISAM, and MyRocks

These are release-specific rules, not a promise that every XtraBackup release supports every MySQL release. If the server is older or uses a different major line, consult the documentation for the matching XtraBackup version instead of forcing the 8.4 binary to run.

Preflight requirements

  • Verify the XtraBackup release against the exact server family and database version.
  • Give the operator read access to the MySQL data files and write access to the backup destination. Run the utility as root or through sudo when that is required by the installation.
  • Reserve enough capacity for the selected full, incremental, compressed, or streamed format. Include temporary working space used during preparation and restoration.
  • Configure credentials and the MySQL privileges required by your installation. Keep a real password out of shell history; use a protected login configuration rather than embedding it in a script.
  • For disaster recovery, place the final copy outside the source host or storage failure domain. A second directory on the same disk does not protect against that disk or host failing.

Create the hot full backup

For a basic full backup, use the documented pattern below:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
xtrabackup --backup --target-dir=/data/backups/ 
  --user=backup --password='REDACTED'

--backup selects backup mode and --target-dir identifies the destination. The destination must be empty; XtraBackup does not overwrite files already there. In production, create a new date- and run-specific directory for every attempt, such as /data/backups/full-20261015-120000, rather than reusing a directory left by an earlier run.

The source database stays online during the physical copy. XtraBackup reads data files while its log-copying thread scans the transactional log. If the server writes fast enough for log records to be overwritten before that thread reads them, the backup can fail. Treat the command’s output and exit status as operational signals: capture both, alert on failure, and do not mark a run successful merely because a directory was created.

Record enough metadata to find the right restore set

Keep the command output with the backup and record the run identifier, server identity, XtraBackup version, backup type, and the log-sequence information reported for the set. Those details let an operator distinguish a complete full backup from a failed or partial copy and establish the correct order when incrementals are involved.

Prepare the copied files before restoring

A newly copied directory is not restore-ready. Run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
xtrabackup --prepare --target-dir=/data/backups/

Preparation applies redo and performs crash recovery on the copied files. It can run on a utility host; it does not have to consume CPU and disk on the originating database server or on the eventual restore server. Do not interrupt this phase casually. Percona warns that an interrupted prepare can corrupt the data files and leave the backup unusable.

Preparing a full backup that will receive incrementals

If the full backup is the base of an incremental chain, prepare the base with log application left open:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
xtrabackup --prepare --apply-log-only --target-dir=/data/backups/

Apply each incremental in sequence according to its log-sequence ranges, keeping the base and every required incremental together under controlled retention. Only after the last incremental has been applied should you perform a normal final prepare. That final pass rolls back uncommitted transactions and produces the restore-ready state. A normal prepare performed too early closes the base for the intended incremental sequence.

Restore onto a stopped, empty MySQL instance

Physical restore replaces the target data directory. Stop the target MySQL service and make sure the directory is empty before copying files into it. The documented sequence is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
systemctl stop mysql
rm -rf /var/lib/mysql/*
xtrabackup --copy-back 
  --target-dir=/data/backups/ 
  --datadir=/var/lib/mysql/
chown -R mysql:mysql /var/lib/mysql
systemctl start mysql

Adapt the service name and data-directory path to the target installation. The important conditions are that the server is stopped and that no old data files remain in the destination. Starting MySQL against a non-empty directory can mix unrelated files with the restored set; copying over a running instance can produce an inconsistent result.

--copy-back versus --move-back

--copy-back leaves the prepared backup in place and copies its files to the target. --move-back moves the files instead, removing the backup copy as part of the operation. Use the move form only when deliberately accepting the loss of that local restore copy. Retaining the prepared backup is normally safer until startup and validation have succeeded.

Fix ownership before startup

A restore run as root leaves the copied files owned by root, while MySQL normally runs as the mysql user. The recursive chown step in the sequence corrects that mismatch. If ownership is wrong, the service may fail before it can read its tables. After starting the service, inspect the server log for the ready for connections message rather than relying only on a successful systemd start command.

Validate the recovered database, not just the file copy

A successful --copy-back proves that files were placed, not that the recovered application is usable. Perform validation on an isolated recovery host or container whenever possible:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Confirm that the MySQL service starts and reaches its normal ready state.
  2. Check that expected schemas and tables are present.
  3. Compare row counts or other known integrity checks for important tables.
  4. Run representative read queries used by the application.
  5. Exercise the application paths that depend on the recovered data, while keeping the drill isolated from production traffic.
  6. Record the elapsed restore and validation times and any manual actions required.

The drill should verify the recovery objectives that matter to your team. A backup that can be downloaded but cannot be prepared, started, or interpreted by the application is not a usable disaster-recovery copy.

Stream, encrypt, and store a copy outside the failure domain

The XtraBackup toolchain includes xbstream for streaming, xbcrypt for encryption, and xbcloud for transfers to Amazon S3, Google Cloud Storage, Azure Blob Storage, or MinIO. A common off-site design is:

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
  1. Create a full or incremental backup on the source or a nearby backup host.
  2. Stream it with xbstream and encrypt it with xbcrypt when the storage or transport policy requires encryption.
  3. Upload the resulting objects with xbcloud to storage in a separate failure domain.
  4. During a recovery drill, download the objects and decrypt them with the corresponding key material.
  5. Prepare the recovered set, restore it on a clean target, and perform the application checks described above.

Keep encryption keys separate from the backup objects. Object storage and an encrypted archive stored together are not a complete recovery plan if the key is lost with the same account, host, or region. Test retrieval of both the backup and its key before declaring the path usable.

Understand full, incremental, and partial backup rules

Backup form What it changes Restore handling
Full Complete physical backup used on its own or as the base for incrementals Prepare it, then restore the prepared data directory with --copy-back or deliberately with --move-back
Incremental Copies changes after a full or earlier incremental, reducing the amount copied per run Retain the base full and every required incremental; apply them in log-sequence order, then perform the final normal prepare
Partial Backs up selected tables rather than a complete instance Requires innodb_file_per_table; restore by importing tables, not with --copy-back or --move-back

Incrementals reduce transfer and copy volume but add chain-management risk. Keep an inventory of the base and each incremental, prevent accidental deletion of a link in the chain, and periodically test the complete sequence rather than testing only the newest file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Partial backups are a separate workflow. They must not be used as the base for an incremental chain, and their table-import restore process should be documented independently from a full-instance recovery runbook.

How XtraBackup compares with other backup approaches

Choose a method according to the recovery problem, not simply the smallest backup file. XtraBackup is a physical method: it preserves the server’s physical table and log structures and is designed for rapid whole-instance recovery. A logical dump such as mysqldump represents rows and schema statements, can be selective and portable, but generally requires more work to recreate indexes and load data. MySQL documentation notes that physical backups can restore faster than logical techniques, although the actual result depends on storage, data size, and workload.

Managed backup services may reduce the work of scheduling, retention, off-site replication, and key handling, but they introduce provider, network, and service-specific recovery dependencies. Evaluate each option on the same axes: whether the source remains available, physical versus logical recovery, restore speed and storage footprint, server-version and engine compatibility, support for incremental copies, compression, streaming and encryption, operational complexity, restore-testing burden, and the location of off-site data.

XtraBackup also leaves more responsibility with your team. You must select a compatible release, protect credentials, retain a complete incremental chain, prepare without interruption, manage ownership on restore, and prove that keys and objects can be retrieved. Organizations that need help operating the open-source solution can investigate Percona commercial support after defining these requirements; support availability or pricing should be confirmed directly rather than assumed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common failure points and the correct response

Version or engine incompatibility

If the utility rejects the server or the prepared files cannot be used with the target, stop and verify the XtraBackup release, server family, database creation series, and storage engines. Do not work around a documented compatibility gate by copying files with a different major release.

Destination already contains files

XtraBackup does not overwrite an existing target directory. Select a new empty run directory after confirming that the old directory is not the only surviving copy. This check applies both to creating backups and to preparing a set in an accidentally reused location.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Log-copying thread cannot keep up

High write activity can overwrite log records before the copy thread reads them. Treat the run as failed, preserve its output for diagnosis, and schedule a new attempt after investigating the write-rate and storage conditions. Never promote a run with a failure exit status as a recovery point.

Prepare was interrupted

An interrupted prepare can corrupt the data files. Return to an intact source backup or a known-good copy and restart preparation; do not assume that rerunning a partially completed operation has repaired the set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

MySQL will not start after copy-back

First confirm that the service was stopped during replacement, the target directory contained only the restored files, and ownership is mysql:mysql. Then inspect the MySQL error log for the reason it did not reach ready for connections before attempting application tests.

A partial backup was treated as a full instance

Partial sets cannot seed an incremental chain and are not restored by replacing the entire data directory. Use the table-import procedure for the selected tables and maintain a separate full-backup path for instance-level recovery.

Off-site objects exist but the key does not

Encrypted objects without recoverable key material cannot be restored. Store and test access to the keys through a separate, controlled path and include that retrieval step in every recovery drill.

Build a repeatable operating routine

For production, turn the sequence into an auditable runbook rather than a one-line cron job. Define which XtraBackup release is approved for each server family, where full and incremental sets are stored, how long each chain is retained, who can access credentials and encryption keys, and which host performs preparation. Capture command output, exit status, backup metadata, and log-sequence information for every run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Schedule restore drills on an isolated target. Download the off-site copy, recover the key, prepare the files, restore to an empty data directory, correct ownership, start MySQL, and execute application-level checks. Record what succeeded and what required manual intervention. This is the evidence that the backup process meets your recovery objectives; the existence of backup files alone is not.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the documented timing does—and does not—tell you

The current XtraBackup 8.4 documentation describes approximately 15–20 minutes for its basic tutorial and 30–40 minutes for its Docker Compose tutorial. Those figures describe following tutorials, not backup throughput, production restore duration, or guaranteed downtime. The reviewed official material publishes no authoritative benchmark for backup speed, restore time, or downtime. Measure those values on your own data volume, storage, write rate, and network path during a controlled drill.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Production checklist

  • Confirm the server family, database creation series, storage engines, and matching XtraBackup release.
  • Verify permissions, credentials, empty destination space, and capacity for working files.
  • Create each full or incremental run in a unique directory and capture output and exit status.
  • Check the reported log-sequence metadata and retain every member of an incremental chain.
  • Prepare on a utility host, using --apply-log-only until all incrementals are applied.
  • Keep the final prepared copy in a separate failure domain and protect its encryption keys independently.
  • Restore only to a stopped server with an empty data directory; correct ownership before startup.
  • Validate service readiness, schemas, tables, representative queries, and application behavior.
  • Record drill duration and manual steps, then update the runbook when the process changes.

Frequently Asked Questions

Can I create a hot MySQL backup without downtime?

Yes. XtraBackup copies physical files while the MySQL-compatible server remains available. The source can continue serving traffic, but heavy write activity may cause the log-copying thread to fall behind and make the run fail.

Why is the backup not ready to restore immediately after –backup?

Files are copied at different moments, so the directory is not a single consistent instant. Run xtrabackup --prepare to apply redo and perform crash recovery before restoring.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which MySQL versions work with XtraBackup 8.4?

The 8.4 documentation requires databases created with the 8.4 series or later and states that MySQL 8.0 and 9.x servers are unsupported. Use the documentation for the XtraBackup release that matches an older server.

Can I prepare a backup on another machine?

Yes. Preparation can run on a utility host rather than the original database server or the eventual restore server, provided that host has the required files, permissions, and working capacity.

What is the correct copy-back sequence?

Stop MySQL, ensure the target data directory is empty, run --copy-back against the prepared backup, change ownership to mysql:mysql, start MySQL, and check the logs for “ready for connections” before testing the application.

When should I use –move-back instead of –copy-back?

Use --move-back only when you intentionally want to move the prepared files and accept removal of the backup copy. --copy-back preserves the prepared set for additional recovery or troubleshooting.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can a partial backup seed an incremental chain?

No. Partial backups require innodb_file_per_table, must be restored by importing the selected tables, and cannot be used as the base for incremental backups.

How do I know an off-site encrypted backup is really recoverable?

Perform a drill that retrieves both the backup objects and their separately stored encryption keys, decrypts and prepares the set, restores it on a clean target, and runs database and application checks.

The Bottom Line

Use Percona XtraBackup as a complete workflow, not a single command: verify compatibility, create the live full or incremental copy, prepare it correctly, restore to a stopped and empty target, fix ownership, and validate the application. Keep a tested, encrypted copy outside the source failure domain, with its keys stored separately.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.