• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Install Percona XtraBackup on Ubuntu Server

By Abhishek Ghosh October 6, 2019 3:36 pm Updated on October 6, 2019

How to Install Percona XtraBackup on Ubuntu Server

Advertisement

To follow this guide, ideally you should have Percona MySQL installed and configured in the way we described in our linked guide. But Percona XtraBackup supports all MySQL flavours like Percona Server, MariaDB, and the original MySQL from Oracle. You must apply the fixes to resolve problems such as Debian distro-specific automatic restart issues. If the server you are going to work is of live website, then first you should take a manual backup and test whether it is working.

 

Why We Need Percona XtraBackup?

 

mysqldump is the commonly used trusted backup tool which comes with the MySQL package. It is a multi-threaded process for backup and single-threaded for restore. It is the best tool if databases are less than 20GB and you are manually working. In this way, the restore process will take higher time. Percona XtraBackup is like super-charged mysqldump which supports incremental backup. It is a good tool to backup >20GB databases. It is fast, supports compression, encryption, a suitable tool for master/slave setup.

How to Install Percona XtraBackup on Ubuntu Server

 

Steps to Install Percona XtraBackup

 

First, you need to create a backup-user of MySQL. Run these commands :

Advertisement

---

Vim
1
2
3
4
5
6
7
#
mysql -u root -p
CREATE USER 'backupuser'@'localhost' IDENTIFIED BY 'use-own-password';
GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO 'backupuser'@'localhost';
FLUSH PRIVILEGES;
exit
#

Create a new directory to store the MySQL backup files:

Vim
1
2
3
4
5
6
7
#
mkdir -p /data/backups/mysql/
## optional steps
touch /data/backups/mysql/README.md
echo "I have manually created this directory for Percona XtraBackup" > /data/backups/mysql/README.md
cat
#

Now, fetch the repository packages from Percona’s website:

Vim
1
2
3
4
5
#
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
 
#

Once you install the package, the Percona repositories should be added in the /etc/apt/sources.list.d/percona-release.list file. Now, install it :

Vim
1
2
3
4
5
#
sudo apt-get update
sudo apt-get install percona-xtrabackup-24
 
#

For Percona’s software, we mentioned in our previous guides the need to pin the selected packages to avoid the upgrades from the distribution repositories. Essentially, you need to create a new file named /etc/apt/preferences.d/00percona.pref :

Vim
1
2
3
#
nano /etc/apt/preferences.d/00percona.pref
#

… and add the following lines in it:

Vim
1
2
3
Package: *
Pin: release o=Percona Development Team
Pin-Priority: 1001

You can take backup using this format of command :

Vim
1
2
3
#
innobackupex --user=backupuser  --password=use-own-password--no-timestamp /data/backups/first_backup
#

After creating the backup, the data is not ready to be restored. We need the prepare for restoration :

Vim
1
2
3
#
innobackupex --apply-log /data/backups/first_backup
#

Wait still the process is completed. The backup is now ready to be restored on the same server or on the another server. Below is how you’ll restore backup in case of MariaDB :

Vim
1
2
3
4
5
6
7
8
9
#
systemctl stop mysql
mkdir ~/mysql_old/
mv /var/lib/mysql/* ~/mysql_old/
innobackupex --copy-back /data/backups/my_backup
# wait for 'innobackupex: completed OK' message
chown -R mysql:mysql /var/lib/mysql
systemctl start mysql
#

Percona has detailed documentation :

Vim
1
2
3
#
https://www.percona.com/doc/percona-xtrabackup/2.3/index.html
#

There are various user created bash scripts available on GitHub to automate the process. Here is an example of bash script on my GitHub repo to automate the full incremental backup.

Tagged With https://thecustomizewindows com/2019/10/how-to-install-percona-xtrabackup-on-ubuntu-server/ , innodbbackupex restore backup to new server , install xtrabackup 2 4 on ubuntu , install xtrabackup manualy
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Install Percona XtraBackup on Ubuntu Server

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Steps to Install Percona MySQL Server on Ubuntu 18.04 LTS

    Here is Latest, Tested Steps to Install Percona MySQL Server on Ubuntu 18.04 LTS For Cloud Server, VPS and Dedicated Server.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy