{"id":240487,"date":"2022-02-18T08:00:00","date_gmt":"2022-02-18T15:00:00","guid":{"rendered":"https:\/\/virtual-dba.com\/?p=240487"},"modified":"2022-02-18T08:47:03","modified_gmt":"2022-02-18T15:47:03","slug":"percona-xtrabackup-example","status":"publish","type":"post","link":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/","title":{"rendered":"Percona XtraBackup Example"},"content":{"rendered":"\n<p>For this example, the following software versions were in use:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Ubuntu v20.04.3<\/li><li>MySQL server v5.7.35<\/li><li>Percona XtraBackup v2.4.24<\/li><\/ol>\n\n\n\n<p>It is important to note that Percona XtraBackup 8.0 is not compatible with MySQL version 5.7 and was introduced for use with MySQL version 8.0. As of the writing of this document, there does not exist a Percona XtraBackup version compatible with the most recent version of MySQL (8.0.28); see <a href=\"https:\/\/www.percona.com\/doc\/percona-xtrabackup\/8.0\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.percona.com\/doc\/percona-xtrabackup\/8.0\/index.html<\/a> for more details.<\/p>\n\n\n\n<p>This document shows a step-by-step example of setting up and restoring incremental backups using Percona XtraBackup on MySQL 5.7.<\/p>\n\n\n\n<p>This document will use &#8220;$&#8221; to denote a command used in the operating system terminal and &#8220;&gt;&#8221; to denote any commands used in the MySQL client command line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-permissions\">Permissions<\/h2>\n\n\n\n<p>The necessary permissions to perform a Percona XtraBackup are easily found on the Percona website: <a href=\"https:\/\/www.percona.com\/doc\/percona-xtrabackup\/2.1\/innobackupex\/privileges.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.percona.com\/doc\/percona-xtrabackup\/2.1\/innobackupex\/privileges.html<\/a> and are as follows (for this example all os permissions were taken care of using root privileges):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td><strong>Permission List<\/strong><\/td><td><strong>Example<\/strong><\/td><td><strong>Permissions Used for Example<\/strong><\/td><\/tr><tr><td><strong>OS<\/strong><\/td><td>READ, WRITE, EXECUTE at filesystem level for the MySQL datadir<\/td><td>$sudo xtrabackup<\/td><td>$sudo -i<\/td><\/tr><tr><td><strong>MySQL<\/strong><\/td><td>RELOAD, LOCK TABLES, REPLICATION CLIENT, CREATE TABLESPACE, PROCESS, SUPER<\/td><td>&gt;GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO &#8216;user&#8217;@&#8217;localhost&#8217;;<\/td><td>&gt;GRANT ALL ON *.* TO &#8216;user&#8217;@&#8217;localhost&#8217;;<br>(root user)<\/td><\/tr><\/tbody><\/table><figcaption><em>Table 1: Minimum permissions necessary for Percona XtraBackup. Note: $ is used to denote the os command line whereas &gt; is used to denote the MySQL client command line.<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"backup\">Backup<\/h2>\n\n\n\n<p>Full backup:<\/p>\n\n\n\n<p>An incremental backup must first begin with a full backup. The command is called like: &#8220;$xtrabackup &#8211;backup &#8211;user=bkupusr &#8211;password &#8211;target-dir=\/home\/user\/fullBackupDestination,&#8221; where target-dir is the destination for the full backup. In this example the target directory will be \/home\/bkupusr\/xtra\/full. If the target directory does not already exist it will be created (Figures 2 and 3).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"262\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image1.png\" alt=\"Percona XtraBackup Example Image1\" class=\"wp-image-240490\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image1.png 874w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image1-480x144.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 874px, 100vw\" \/><figcaption><em>Figure 1: A full backup taken using Percona XtraBackup. Note this example does not use the options &#8211;user or &#8211;password because a login-path has been setup using the program mysql_config_editor.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Figure 1 shows the full backup being taken but without the options &#8211;user or &#8211;password as the login credentials have been set up using $mysql_config_editor. A tutorial on this topic can be found here: https:\/\/virtual-dba.com\/blog\/how-to-use-mysql-config-editor\/<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"187\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image2.png\" alt=\"Percona XtraBackup Example Image2\" class=\"wp-image-240491\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image2.png 800w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image2-480x112.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 800px, 100vw\" \/><figcaption><em>Figure 2: Backup taken when target-dir doesn&#8217;t already exist.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"135\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image3.png\" alt=\"Percona XtraBackup Example Image3\" class=\"wp-image-240492\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image3.png 649w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image3-480x100.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 649px, 100vw\" \/><figcaption><em>Figure 3: A new directory has been created as the specified target-dir path.<\/em><\/figcaption><\/figure>\n\n\n\n<p id=\"incremental-backup\">Incremental Backup:<\/p>\n\n\n\n<p>After the initial full backup is set up incremental backups are next. The command for an incremental backup is very similar to that of a full, but an additional directory is required. Now the target-dir will be where the new incremental files go and the option &#8220;&#8211;incremental-basedir&#8221; is the location of the most recent backup taken (in this case the full backup); Figure 4 shows a first incremental backup taken from the previous full backup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"317\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image4-1024x317.png\" alt=\"Percona XtraBackup Example Image4\" class=\"wp-image-240493\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image4-1024x317.png 1024w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image4-980x303.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image4-480x149.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><figcaption><em>Figure 4: The first incremental backup. The full backup is used as the incremental-basedir and a new destination is selected for which target-dir the incremental backup will go to.<\/em><\/figcaption><\/figure>\n\n\n\n<p>For the next incremental the command is the same, but now the target-dir will specify the location of the next incremental backup, and incremental-basedir will specify the most recent incremental backup as shown in figure 5.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"999\" height=\"257\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image5.png\" alt=\"Percona XtraBackup Example Image5\" class=\"wp-image-240494\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image5.png 999w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image5-980x252.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image5-480x123.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 999px, 100vw\" \/><figcaption><em>Figure 5: A second incremental backup taken using the first incremental backup as the incremental-basedir.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Now there exist three backups (Figures 6-8): one full and two incrementals.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"603\" height=\"348\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image6.png\" alt=\"Percona XtraBackup Example Image6\" class=\"wp-image-240495\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image6.png 603w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image6-480x277.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 603px, 100vw\" \/><figcaption><em>Figure 6: Directory contents of the full backup.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"378\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image7.png\" alt=\"Percona XtraBackup Example Image7\" class=\"wp-image-240496\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image7.png 593w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image7-480x306.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 593px, 100vw\" \/><figcaption><em>Figure 7: Directory contents for the first incremental backup.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"368\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image8.png\" alt=\"Percona XtraBackup Example Image8\" class=\"wp-image-240497\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image8.png 594w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image8-480x297.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 594px, 100vw\" \/><figcaption><em>Figure 8: Directory contents for the second incremental backup.<\/em><\/figcaption><\/figure>\n\n\n\n<p>For additional incremental backups continue on in this fashion moving the previous target-dir to the current incremental-basedir.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"restore\">Restore<\/h2>\n\n\n\n<p>The final step is to restore the backups. There is some setup before the restore can actually be executed:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>MySQL service must be stopped <\/li><li>MySQL data directory must be empty<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image9-1024x482.png\" alt=\"Percona XtraBackup Example Image9\" class=\"wp-image-240498\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image9-1024x482.png 1024w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image9-980x462.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image9-480x226.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><figcaption><em>Figure 9: Restore Prep step 1 &#8211; stop mysql server.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"130\" height=\"108\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image10.png\" alt=\"Percona XtraBackup Example Image10\" class=\"wp-image-240499\"\/><figcaption><em>Figure 10: Restore prep step 2 &#8211; clear out the MySQL data directory.<\/em><\/figcaption><\/figure>\n\n\n\n<p>A full backup restore is relatively simple:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The backup is first prepared:<ul><li>$xtrabackup \u2013prepare \u2013target-dir=\/home\/usr\/full_bkup_directory<ul><li>note the &#8211;prepare option. <\/li><\/ul><\/li><\/ul><\/li><li>The full backup is restored to the empty data directory:<ul><li>$xtrabackup &#8211;copy-back &#8211;target-dir=\/home\/usr\/full_bkup_directory<ul><li>&#8211;copy-back is the restore command<\/li><\/ul><\/li><\/ul><\/li><li>Permissions must be checked\/set on the newly restored backups:<ul><li>$Chown mysql:mysql mysql<ul><li>This is applied to all files recursively in the data directory<\/li><\/ul><\/li><\/ul><\/li><li>Resume MySQL service:<ul><li>$service mysql start<\/li><\/ul><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"217\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image11.png\" alt=\"Percona XtraBackup Example Image11\" class=\"wp-image-240500\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image11.png 694w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image11-480x150.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 694px, 100vw\" \/><figcaption><em>Figure 11: Prepare the full backup for restore.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"237\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image12.png\" alt=\"Percona XtraBackup Example Image12\" class=\"wp-image-240501\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image12.png 641w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image12-480x177.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 641px, 100vw\" \/><figcaption><em>Figure 12: The actual full backup restore.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"712\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image14.png\" alt=\"Percona XtraBackup Example Image14\" class=\"wp-image-240503\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image14.png 797w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image14-480x429.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 797px, 100vw\" \/><figcaption><em>Figure 13: Change the permissions after the restore<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"272\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image13-1024x272.png\" alt=\"Percona XtraBackup Example Image13\" class=\"wp-image-240502\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image13-1024x272.png 1024w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image13-980x260.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image13-480x128.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><figcaption><em>Figure 14: Resume MySQL service.<\/em><\/figcaption><\/figure>\n\n\n\n<p>For an incremental restore the setup and copy-back steps are the same, but the prepare step is different; the additional parameter \u2013apply-log-only must be included alongside the &#8211;prepare statement except on the final incremental backup.<\/p>\n\n\n\n<p>The prepare steps for incremental backups are:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Prepare full <ul><li>$xtrabackup &#8211;prepare &#8211;apply-log-only &#8211;target-dir=\/data\/backups\/full<\/li><\/ul><\/li><li>Apply first incremental backup to full backup<ul><li>$xtrabackup &#8211;prepare &#8211;apply-log-only &#8211;target-dir=\/data\/backups\/full &#8211;incremental-dir=\/data\/backups\/inc1<\/li><\/ul><\/li><li>Apply second incremental backup to full backup<ul><li>$xtrabackup &#8211;prepare &#8211;apply-log-only &#8211;target-dir=\/data\/backups\/full &#8211;incremental-dir=\/data\/backups\/inc2<\/li><\/ul><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"187\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image15.png\" alt=\"Percona XtraBackup Example Image15\" class=\"wp-image-240504\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image15.png 748w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image15-480x120.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 748px, 100vw\" \/><figcaption><em>Figure 15: Preparing the full backup for incremental restore.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"127\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image16-1024x127.png\" alt=\"Percona XtraBackup Example Image16\" class=\"wp-image-240505\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image16-1024x127.png 1024w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image16-980x122.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image16-480x60.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><figcaption><em>Figure 16: Preparing the first incremental backup for restore.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"175\" src=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image17-1024x175.png\" alt=\"Percona XtraBackup Example Image17\" class=\"wp-image-240506\" srcset=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image17-1024x175.png 1024w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image17-980x168.png 980w, https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona_XtraBackup_Example_Image17-480x82.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><figcaption><em>Figure 17: Preparing the second incremental backup for restore.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Again, the copy back steps will be the same as with the full backup (using the only the prepared full backup). After the copy back step the restore is complete.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For this example, the following software versions were in use: Ubuntu v20.04.3 MySQL server v5.7.35 Percona XtraBackup v2.4.24 It is important to note that Percona XtraBackup 8.0 is not compatible with MySQL version 5.7 and was introduced for use with MySQL version 8.0. As of the writing of this document, there does not exist a [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":240512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","content-type":"","footnotes":""},"categories":[4166,39],"tags":[4113,4187,3962],"class_list":["post-240487","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-mysql","tag-mysql-performance","tag-percona","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Percona XtraBackup Example<\/title>\n<meta name=\"description\" content=\"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Percona XtraBackup Example\" \/>\n<meta property=\"og:description\" content=\"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-18T15:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-18T15:47:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/virtual-dba.com\/media\/Percona-XtraBackup-Example.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"XTIVIA\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:site\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"XTIVIA\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\"},\"author\":{\"name\":\"XTIVIA\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\"},\"headline\":\"Percona XtraBackup Example\",\"datePublished\":\"2022-02-18T15:00:00+00:00\",\"dateModified\":\"2022-02-18T15:47:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\"},\"wordCount\":896,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg\",\"keywords\":[\"mysql performance tuning\",\"Percona\",\"Ubuntu\"],\"articleSection\":[\"Blog\",\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\",\"url\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\",\"name\":\"Percona XtraBackup Example\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg\",\"datePublished\":\"2022-02-18T15:00:00+00:00\",\"dateModified\":\"2022-02-18T15:47:03+00:00\",\"description\":\"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.\",\"breadcrumb\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg\",\"width\":557,\"height\":291},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtual-dba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Percona XtraBackup Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtual-dba.com\/#website\",\"url\":\"https:\/\/virtual-dba.com\/\",\"name\":\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"description\":\"Remote Database Administration\",\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtual-dba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/virtual-dba.com\/#organization\",\"name\":\"Virtual-DBA: Remote DBA | Remote Database Administration\",\"alternateName\":\"Virtual-DBA powered by XTIVIA\",\"url\":\"https:\/\/virtual-dba.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"width\":557,\"height\":291,\"caption\":\"Virtual-DBA: Remote DBA | Remote Database Administration\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/virtual_dba\",\"https:\/\/www.linkedin.com\/showcase\/36220649\/\",\"https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg\"],\"description\":\"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.\",\"email\":\"info@xtivia.com\",\"telephone\":\"8886853101\",\"legalName\":\"XTIVIA, Inc\",\"foundingDate\":\"1992-05-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1\",\"name\":\"XTIVIA\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g\",\"caption\":\"XTIVIA\"},\"url\":\"https:\/\/virtual-dba.com\/author\/xtivia\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Percona XtraBackup Example","description":"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/","og_locale":"en_US","og_type":"article","og_title":"Percona XtraBackup Example","og_description":"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.","og_url":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/","og_site_name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","article_published_time":"2022-02-18T15:00:00+00:00","article_modified_time":"2022-02-18T15:47:03+00:00","og_image":[{"width":557,"height":291,"url":"https:\/\/virtual-dba.com\/media\/Percona-XtraBackup-Example.jpg","type":"image\/jpeg"}],"author":"XTIVIA","twitter_card":"summary_large_image","twitter_creator":"@virtual_dba","twitter_site":"@virtual_dba","twitter_misc":{"Written by":"XTIVIA","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#article","isPartOf":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/"},"author":{"name":"XTIVIA","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1"},"headline":"Percona XtraBackup Example","datePublished":"2022-02-18T15:00:00+00:00","dateModified":"2022-02-18T15:47:03+00:00","mainEntityOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/"},"wordCount":896,"commentCount":0,"publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg","keywords":["mysql performance tuning","Percona","Ubuntu"],"articleSection":["Blog","MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/","url":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/","name":"Percona XtraBackup Example","isPartOf":{"@id":"https:\/\/virtual-dba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg","datePublished":"2022-02-18T15:00:00+00:00","dateModified":"2022-02-18T15:47:03+00:00","description":"This article is a walk-through example of a full and incremental backup and restore on a MySQL database using Percona XtraBackup.","breadcrumb":{"@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#primaryimage","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/Percona-XtraBackup-Example.jpg","width":557,"height":291},{"@type":"BreadcrumbList","@id":"https:\/\/virtual-dba.com\/blog\/percona-xtrabackup-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtual-dba.com\/"},{"@type":"ListItem","position":2,"name":"Percona XtraBackup Example"}]},{"@type":"WebSite","@id":"https:\/\/virtual-dba.com\/#website","url":"https:\/\/virtual-dba.com\/","name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Remote Database Administration","publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtual-dba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/virtual-dba.com\/#organization","name":"Virtual-DBA: Remote DBA | Remote Database Administration","alternateName":"Virtual-DBA powered by XTIVIA","url":"https:\/\/virtual-dba.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","width":557,"height":291,"caption":"Virtual-DBA: Remote DBA | Remote Database Administration"},"image":{"@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/virtual_dba","https:\/\/www.linkedin.com\/showcase\/36220649\/","https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg"],"description":"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.","email":"info@xtivia.com","telephone":"8886853101","legalName":"XTIVIA, Inc","foundingDate":"1992-05-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/2d86f74bed0c3f1b49100f7fdf7d78d1","name":"XTIVIA","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0d3648a00e319a37cf8d6d19f762acfbbb4fd0320fd8a6d6b1e64f44a2a6f259?s=96&d=mm&r=g","caption":"XTIVIA"},"url":"https:\/\/virtual-dba.com\/author\/xtivia\/"}]}},"_links":{"self":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/240487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/comments?post=240487"}],"version-history":[{"count":0,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/240487\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media\/240512"}],"wp:attachment":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media?parent=240487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/categories?post=240487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/tags?post=240487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}