2.15 Basic Admin

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
7 hours 36 minutes
Difficulty
Beginner
CEU/CPE
3
Video Transcription
00:00
Welcome back to module to databases. This is less than three basic admin.
00:05
Within this lesson, we're going to go over to basic concepts, and that is how to back up a database and how to restore data base in the di beaver application.
00:15
So I have D Beaver Open
00:18
and I have this example database that we just made in the previous lessons
00:23
I'm going to right click it
00:25
and click tools
00:27
and then dumped database.
00:30
So a back of a database is often called a dump, and the reason it's called that is because often the process just
00:38
dumps all the create statements you would need to restore the database later.
00:43
So in the first screen you get to select the databases you want to
00:47
back up and the tables within the database. You want a backup, and by default, the selection is based on where you selected to begin the process.
00:57
So, for example, if we wanted to back up the example database,
01:02
this would be perfectly fine. We're backing up this database with thes three tables,
01:07
and again these default options are pretty much fine. The only thing you might want to do is lock all tables on. The reason you're doing that is that if there's any application using your database,
01:22
you will lock the table so that they cannot add new data while you're backing up the database,
01:27
which is, Ah,
01:29
good practice just because you could accidentally get some corruption in the data
01:34
if someone happens to be trying to update something right when you hit the back of button.
01:40
So once you have these
01:42
other default options selected, you would just click start taking note of the directory that it's going to
01:51
and it's done. And of course, the speed of that will depend on the database
01:56
that you have backed up.
02:00
And that is how you back up a database in DV ver.
02:06
So now let's look at restoring a database.
02:08
So I have also dumped the employees database, which was a sample database that we work we worked on in a previous lesson. You can see it's a much larger database, and that's because it dumped out with all that extra test. Out of that,
02:23
they were kind enough to provide within with that sample database, so I'm gonna go ahead and restore that
02:28
now. It is common for, um it is common for the restore Falls to not actually name the database. So sometimes you will need to create the database. So I'm gonna go ahead and create a new database and call it employees
02:45
and hit. OK,
02:47
I will go ahead and set That is active. And then I'm gonna right click it again
02:53
and selected tools and select Restore Data Days.
02:59
And we need to find that file that we backed up, which is this file,
03:05
and the default options were fine.
03:08
And now you can simply hit start,
03:14
and that is a larger database. So that will probably take just a little bit of time
03:22
to import.
03:23
So I will go ahead and pause the video and fast forward to the completion of that important.
03:30
Okay, The database import completed
03:34
it. Ah, took roughly. I want to say about a minute and 1/2 to complete that,
03:40
and we'll close that will take a look at our database. Let's go ahead and click on the employees table. Make sure that it's
03:47
imported. Everything
03:49
click on the data.
03:51
So we have all the data there again.
03:54
And if you were to look inside those backup files, you would see exactly what it's doing.
04:00
So it's too classic models. It's a smaller database.
04:02
Books
04:04
want at it,
04:06
so you can see it's creating. It's running the create table
04:10
after it drops it if it exists. So it checks the table existed and drops it,
04:15
and then it inserts all the values that it had into the table
04:20
when you backed it up. Now it is common
04:24
for text editors to not be able to open and work well with large files such as this,
04:29
and that's fine. You don't need to be too concerned with that. The import process will correctly parts the data. It's just really a question of how much time that will take to complete.
04:39
Usually even with a large volume of that. It doesn't take a terrible, terribly long time to complete,
04:46
so that completes this lesson in this lesson. Again, we learned how to back up and restore a database using D beaver. That process will allow you to, you know, save databases that you're working on and move them to new computers if you need Thio.
05:03
So I hope you enjoy this lesson and the next module
05:08
module three programming we're gonna start to have some real fun getting to the sequel statements, complex queries, views and the combination of the solutions. So I hope to see you there. Thank you.
Up Next