{"id":33682,"date":"2020-07-17T17:16:40","date_gmt":"2020-07-17T22:16:40","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=33682"},"modified":"2022-06-03T03:32:50","modified_gmt":"2022-06-03T08:32:50","slug":"how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/","title":{"rendered":"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-33904\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this tutorial, we will show you how to create a backup of MySQL databases on an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Ubuntu 20.04 VPS<\/a>, and create a backup of the entire <code>\/var\/lib\/mysql<\/code> directory.<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-33907\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/configure-mysql-backups-with-mysqldump-for-ubuntu20.04-vps.jpg\" alt=\"\" width=\"120\" height=\"62\" \/>We will create the <a href=\"https:\/\/www.rosehosting.com\/blog\/backup-and-restore-your-mysql-database\/\">backup of the databases<\/a> using MySQL&#8217;s command, aptly named <code>mysqldump<\/code>. After that we will then show you how to perform a backup of the <code>\/var\/lib\/mysql<\/code> directory where MySQL have been located. Performing regular backups of your database and database server is vital to protecting the data that you have on your server. This way, in case something goes wrong on your Ubuntu 20.04 VPS, or if MySQL breaks for some reason (incompatibilities or otherwise), you&#8217;ll have a safe backup that you can revert to and prevent the loss of your precious data.<\/p>\n<p>Once you create a backup of MySQL databases and save them on your server or on a remote location, you can then always be able to restore the databases later from this backup, if needed. Creating a backup of MySQL database is essential for any website owner, and it should be done on a regular basis. Just follow the simple steps in this tutorial and your data will be redundant in no time. Let&#8217;s begin.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fcb764e8d72\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fcb764e8d72\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#What-is-MySQL\" >What is MySQL?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#Step-1-Update-OS-packages\" >Step 1. Update OS packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#Step-2-Install-the-MySQL-Database-server\" >Step 2. Install the MySQL Database server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#Step-3-Create-a-MySQL-Database\" >Step 3. Create a MySQL Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#Step-4-Create-a-Backup-using-%E2%80%98mysqldump\" >Step 4. Create a Backup using &#8216;mysqldump&#8217;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#Step-5-Copy-the-MySQL-Database-Directory\" >Step 5. Copy the MySQL Database Directory<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What-is-MySQL\"><\/span><strong>What is MySQL?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>MySQL is an open-source relational database management system (RDBMS). MySQL is a component of the LAMP web application software stack (and others), which is an acronym for Linux, Apache, MySQL, and PHP. MySQL is used by many web applications, including WordPress, Drupal, Laravel, and so many more. MySQL is also used by many popular websites, including YouTube, Twitter, and Facebook.<\/p>\n<p>This multi-step guide was written and tested for Ubuntu 20.04, but it should work on other Linux distributions as well. Let&#8217;s get started!<\/p>\n<p>First off, we assume that you have SSH access to your server.<\/p>\n<p>Log in to your server via SSH:<\/p>\n<pre>ssh <span style=\"color: #ff0000;\">root<\/span>@<span style=\"color: #ff0000;\">server_ip<\/span> -p <span style=\"color: #ff0000;\">port_number<\/span><\/pre>\n<p>You can replace <span style=\"color: #ff0000;\">root<\/span> with the username of an administrator account if needed (our VPSes all have root access by default). Then replace <span style=\"color: #ff0000;\">server_ip<\/span> with the IP address of your server, and <span style=\"color: #ff0000;\">port_number<\/span> with your SSH port, with 22 being the default value.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Update-OS-packages\"><\/span>Step 1. Update OS packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let\u2019s make sure that your operating system is up-to-date.<\/p>\n<pre>apt-get update<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-the-MySQL-Database-server\"><\/span>Step 2. Install the MySQL Database server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>MySQL is a popular database management system and it can be installed easily on any Linux server. Thanks to its popularity, packages for MySQL exist on almost all modern Linux distributions. The latest version of MySQL is version 8.0, but a newer version may exist after this article has been written.<\/p>\n<p>To install the MySQL service, run the following command:<\/p>\n<pre>apt install mysql-server<\/pre>\n<p>In order to verify that MySQL is installed, as well as check the status of the MySQL service, we can use the following commands:<\/p>\n<pre>qpkg -l | grep -imysql\r\n\r\nsystemctl status mysql<\/pre>\n<p>The output of the <code>systemctl status mysql<\/code> command should be similar to this one:<\/p>\n<pre>\u25cf mysql.service - MySQL Community Server\r\n     Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset: enabled)\r\n     Active: active (running) since Sun 2020-06-07 07:49:38 UTC; 52min ago\r\n   Main PID: 17700 (mysqld)\r\n     Status: \"Server is operational\"\r\n      Tasks: 39 (limit: 2266)\r\n     Memory: 325.7M\r\n     CGroup: \/system.slice\/mysql.service\r\n             \u2514\u250017700 \/usr\/sbin\/mysqld\r\n<\/pre>\n<p>Let&#8217;s go over managing the MySQL service. Enable the MySQL service to start on server boot with the following command:<\/p>\n<pre>systemctl enable mysql<\/pre>\n<p>For starting and stopping the MySQL service, we can use the following commands respectively:<\/p>\n<pre>systemctl start mysql\r\n\r\nsystemctl stop mysql<\/pre>\n<p>In order to check the installed MySQL version, execute the following command:<\/p>\n<pre>mysql -V<\/pre>\n<p>The output should look similar to this:<\/p>\n<pre>mysql  Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))<\/pre>\n<p>To improve the security of the MySQL server, it is a good idea to run the <strong>mysql_secure_installation<\/strong> script by typing the following command. It allows you to perform some extra configuration, such as setting a root password, deleting the example database, and so on:<\/p>\n<pre>mysql_secure_installation<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Create-a-MySQL-Database\"><\/span>Step 3. Create a MySQL Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this step, we will create a MySQL database, MySQL user, and a password for the new user, along with the required permissions for our test database. Later we will make a dump of the newly created database.<\/p>\n<p>Log in to your MySQL console with the following command:<\/p>\n<pre>mysql -u root -p<\/pre>\n<p>Enter password:\u00a0 (Enter your MySQL root password if you set it during the <strong>mysql_secure_installation<\/strong> process. Leave blank if you didn&#8217;t)<\/p>\n<p>Once you are logged in, execute the following commands one-by-one:<\/p>\n<pre>mysql&gt; CREATE DATABASE testDB;\r\nmysql&gt; CREATE USER 'admin_user'@'localhost' IDENTIFIED BY '<span style=\"color: #ff0000;\">StrongPassword<\/span>';\r\nmysql&gt; GRANT ALL PRIVILEGES ON testDB.* TO 'admin_user'@'localhost';\r\nmysql&gt; FLUSH PRIVILEGES;\r\nmysql&gt; exit;<\/pre>\n<p>Do not forget to replace <strong>&#8220;<span style=\"color: #ff0000;\">StrongPassword<\/span>&#8220;<\/strong> with your own strong generated password.<\/p>\n<p>Once you create a MySQL database, we can list the all the MySQL databases from within the MySQL console using the following command:<\/p>\n<pre>show databases;<\/pre>\n<p>The output should look like this:<\/p>\n<pre>mysql&gt; show databases;\r\n+--------------------+\r\n| Database           |\r\n+--------------------+\r\n| information_schema |\r\n| mysql              |\r\n| performance_schema |\r\n| sys                |\r\n| testDB             |\r\n+--------------------+\r\n5 rows in set (0.00 sec)<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Create-a-Backup-using-%E2%80%98mysqldump\"><\/span>Step 4. Create a Backup using &#8216;mysqldump&#8217;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is the main step where we will create a backup of MySQL databases using the <code>mysqldump<\/code> command-line utility.<\/p>\n<p>Enter in a directory of your choice where you want the backup to be saved.<\/p>\n<p>For the purposes of this tutorial, we will use the <code>\/backup<\/code> directory.<\/p>\n<pre>cd \/backup<\/pre>\n<p>Execute the following command to create a database dump of the test database that we created previously:<\/p>\n<pre>mysqldump -u admin_user -p testDB &gt; backup.sql<\/pre>\n<p>Enter the &#8220;admin_user&#8221; password that you set and list the files in the <code>\/backup<\/code> directory to make sure the database backup was created successfully:<\/p>\n<pre>ls -al | grep backup<\/pre>\n<p>The output should look like this:<\/p>\n<pre>-rw-r--r--  1 root root 1267 Jun  7 09:52 backup.sql<\/pre>\n<p>If you want to create a database dump of all databases on your server use the following command using the MySQL root user credentials:<\/p>\n<pre>mysqldump --all-databases -u root -p &gt; AllDatabaseBackup.sql<\/pre>\n<p>Enter the <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-reset-the-mysql-root-password\/\">MySQL root password<\/a> and again, to check that backup was made successfully, run the following command:<\/p>\n<pre>ls -al | grep All<\/pre>\n<p>The output shoud look like this:<\/p>\n<pre>-rw-r--r--  1 root root 1036456 Jun  7 10:15 AllDatabaseBackup.sql<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Copy-the-MySQL-Database-Directory\"><\/span>Step 5. Copy the MySQL Database Directory<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This step is optional. If you want to copy the entire directory where MySQL databases are located along with its data,\u00a0first, you have to stop the MySQL service with the following command:<\/p>\n<pre>systemctl stop mysql<\/pre>\n<p>Verify that the MySQL service is stopped with this command:<\/p>\n<pre>systemctl status mysql<\/pre>\n<p>The output should look like this:<\/p>\n<pre>\u25cf mysql.service - MySQL Community Server\r\n     Loaded: loaded (\/lib\/systemd\/system\/mysql.service; enabled; vendor preset: enabled)\r\n     Active: inactive (dead) since Sun 2020-06-07 10:50:19 UTC; 4s ago\r\n    Process: 17700 ExecStart=\/usr\/sbin\/mysqld (code=exited, status=0\/SUCCESS)\r\n   Main PID: 17700 (code=exited, status=0\/SUCCESS)\r\n     Status: \"Server shutdown complete\"<\/pre>\n<p>Once this is done, we are ready to copy the MySQL database directory with the <strong>rsync<\/strong> command:<\/p>\n<pre>rsync -Waq --numeric-ids \/var\/lib\/mysql\/ \/backup\/mysql.raw\/<\/pre>\n<p>Check the <code>\/backup\/mysql.raw<\/code> directory and list the files and directories inside to ensure that the backup of the <code>\/var\/lib\/mysql<\/code> directory was made successfully.<\/p>\n<pre>cd \/backup\/mysql.raw\r\n\r\nls -alh<\/pre>\n<p>After a raw backup has been created, we can start the MySQL service using the following command:<\/p>\n<pre>systemctl start mysql<\/pre>\n<p>That&#8217;s it. Congratulations, you have successfully created a backup with the &#8220;<strong>mysqldump<\/strong>&#8221; command-line utility, and a raw backup of MySQL databases using rsync on your Ubuntu 20.04 VPS. Now you can safely store and protect your data.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-33908\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/mysql-security-support-fully-managed-by-experts-for-linux-ubuntu-vps.jpg\" alt=\"\" width=\"120\" height=\"62\" \/>If you are one of our <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Managed Ubuntu Hosting<\/a> customers, you don\u2019t have to create a MySQL backup by yourself on Ubuntu 20.04 &#8211; our expert Linux admins will set up and optimize your MySQL server for you, and even implement database backups to happen automatically. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong><\/span>. If you liked this post on how to Create a Backup of MySQL Using mysqldump on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will show you how to create a backup of MySQL databases on an Ubuntu 20.04 VPS, &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#more-33682\" aria-label=\"Read more about How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":33904,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1702,13,1698],"tags":[457,39,1839],"class_list":["post-33682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-tutorials","category-ubuntu","tag-backup","tag-mysql","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Backup MySQL Databases Using mysqldump on Ubuntu 20.04<\/title>\n<meta name=\"description\" content=\"Learn how to create a backup of MySQL databases using mysqldump on an Ubuntu 20.04 in just a few simple steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04\" \/>\n<meta property=\"og:description\" content=\"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-17T22:16:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:32:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04\",\"datePublished\":\"2020-07-17T22:16:40+00:00\",\"dateModified\":\"2022-06-03T08:32:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/\"},\"wordCount\":1090,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\",\"keywords\":[\"backup\",\"mysql\",\"Ubuntu 20.04\"],\"articleSection\":[\"Databases\",\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/\",\"name\":\"How to Backup MySQL Databases Using mysqldump on Ubuntu 20.04\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\",\"datePublished\":\"2020-07-17T22:16:40+00:00\",\"dateModified\":\"2022-06-03T08:32:50+00:00\",\"description\":\"Learn how to create a backup of MySQL databases using mysqldump on an Ubuntu 20.04 in just a few simple steps.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Backup MySQL Databases Using mysqldump on Ubuntu 20.04","description":"Learn how to create a backup of MySQL databases using mysqldump on an Ubuntu 20.04 in just a few simple steps.","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:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04","og_description":"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-07-17T22:16:40+00:00","article_modified_time":"2022-06-03T08:32:50+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04","datePublished":"2020-07-17T22:16:40+00:00","dateModified":"2022-06-03T08:32:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/"},"wordCount":1090,"commentCount":1,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg","keywords":["backup","mysql","Ubuntu 20.04"],"articleSection":["Databases","Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/","name":"How to Backup MySQL Databases Using mysqldump on Ubuntu 20.04","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg","datePublished":"2020-07-17T22:16:40+00:00","dateModified":"2022-06-03T08:32:50+00:00","description":"Learn how to create a backup of MySQL databases using mysqldump on an Ubuntu 20.04 in just a few simple steps.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-create-backup-of-databases-using-mysqldump-on-ubuntu20.04.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-create-a-backup-of-mysql-databases-using-mysqldump-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create a Backup of MySQL Databases Using mysqldump on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=33682"}],"version-history":[{"count":77,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33682\/revisions"}],"predecessor-version":[{"id":41019,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33682\/revisions\/41019"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/33904"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=33682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=33682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=33682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}