From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Restore logical database backups

Restore logical database backups

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Restore logical database backups

- [Instructor] In the last video, we created a couple of logical database backup files in our home directory. We can verify their existence by typing in ls -1 space ~/ *.sql hit enter. Now let's use these files to restore our database. First let's log into MariaDB using the mySQL interactive tool. Type in mysql - u root -p and hit enter, and enter your database password. Let's get a list of databases by typing in show databases;. We can see our Linuxdevs database which we backed up in a previous video. Let's drop this database using the drop command. Type in drop database Linuxdevs; and hit enter. And we'll verify with show databases;. Now that we see it's gone, let's exit and restore the Linuxdev database from our backup. Type in exit. Now type in clear to clear your screen. Now we'll use a mySQL command in a non-interactive way to restore the database. Type in mysql -u root -p < ~/dbbackup-linuxdevs.sql…

Contents