• 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 innodbbackupex restore backup to new server , install xtrabackup 2 4 on ubuntu , install xtrabackup manualy

This Article Has Been Shared 822 Times!

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

  • WordPress XML-RPC Attack & Fake PHP5-FPM Error

    WordPress XML-RPC Attack Can Bring DDoS Resulting in Random 502 PHP5-FPM Errors on Nginx Server or Can Make the Database Down. Here is Fix.

  • Install Nginx HTTP/2 With ALPN on Ubuntu 14.04 From ondrej/nginx PPA

    In our previous guide, we have shown how to easily upgrade Nginx on Ubuntu 14.04 for HTTP/2 support. The required changes in the /etc/nginx/sites-enabled/default file, /etc/nginx/nginx.conf file and limitations of that way of installation has been discussed on this article. In this guide, we will show how to install Nginx HTTP/2 with ALPN on Ubuntu […]

  • Steps to Install NextCloud on Cloud Server (Nginx, Redis Cache)

    Here Are the Steps to Install NextCloud on Cloud Server With Nginx Server, Redis Cache, 2 FA, HTTPS. NextCloud is Like Your Own Dropbox.

  • Configure Apache With Fail2Ban on Ubuntu 18.04

    Here is How To Configure Apache With Fail2Ban on Ubuntu 18.04 to block more types of malicious attempts towards server to create a practical firewall.

  • How To Install Apache Phoenix (SQL on HBase)

    We talked about Apache Phoenix in our previous guides and articles such as How To Install Apache HBase and List of Apache Projects For Big Data. Apache Phoenix is a massively parallel, relational database engine supporting OLTP for Hadoop using Apache HBase as store. Phoenix provides a JDBC driver that cleverly hides the noSQL store […]

Additionally, 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

  • Four Foolproof Tips To Never Run Out Of Blog Ideas For Your Website March 28, 2023
  • The Interactive Entertainment Serving as a Tech Proving Ground March 28, 2023
  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023

About This Article

Cite this article as: Abhishek Ghosh, "How to Install Percona XtraBackup on Ubuntu Server," in The Customize Windows, October 6, 2019, March 29, 2023, https://thecustomizewindows.com/2019/10/how-to-install-percona-xtrabackup-on-ubuntu-server/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT