WEBVTT
00:00:05.000 --> 00:00:09.600
Hi I'm Bob Tabor with www.LearnVisualStudio.net.
In this module
00:00:09.890 --> 00:00:13.100
we are going to talk about backing
up and restoring your databases
00:00:13.150 --> 00:00:17.810
in Azure SQL Database. Now for the
most part backups are automatic.
00:00:18.060 --> 00:00:21.390
You don't really have a lot of options.
It happens for you when
00:00:21.440 --> 00:00:24.620
you create a new database after about
12 hours you will get your
00:00:24.670 --> 00:00:27.920
first backup and then from that point
you can restore the database.
00:00:28.380 --> 00:00:33.180
One caveat is you can't restore the
database while it still exists
00:00:33.230 --> 00:00:36.920
on that server. You have a couple
of choices, you can restore
00:00:37.220 --> 00:00:41.450
to a different server even if it's
in the same region or you
00:00:41.500 --> 00:00:46.890
can restore to the same server as long
as you name the database differently.
00:00:47.260 --> 00:00:52.020
So if you do need to use the same
name on the same server I think
00:00:52.070 --> 00:00:55.860
you are going to have to delete the
database and then restore it.
00:00:55.910 --> 00:00:59.020
That makes me a little bit nervous,
but I think you can probably
00:00:59.070 --> 00:01:01.150
do that and you will
probably be okay.
00:01:01.980 --> 00:01:05.910
So as you can see here I'm in
the Azure portal. I'm looking
00:01:05.960 --> 00:01:10.930
at my databases. I have two of them
provisioned and if you look
00:01:10.980 --> 00:01:16.670
at the servers on my server that
starts with the letter K, if
00:01:16.720 --> 00:01:21.040
you take a look at the backups tab
you can see all of your backups.
00:01:22.290 --> 00:01:26.170
You can see that they were taken
at about the same time and to
00:01:26.220 --> 00:01:29.150
restore one it's pretty simple,
just select one of the backups
00:01:29.200 --> 00:01:30.310
and click restore.
00:01:30.900 --> 00:01:34.640
Now at this point you have a few
options. You can restore to
00:01:35.500 --> 00:01:40.100
the same server, so the server in
my case that starts with the
00:01:40.150 --> 00:01:44.510
letter K, and if I were to try
to remove all this other stuff
00:01:44.560 --> 00:01:48.840
that they add on there to make it
unique, date time stamp, and
00:01:48.890 --> 00:01:54.340
attempt to restore with that database
name you are going to get
00:01:54.390 --> 00:01:57.460
an error and it says, "A database
with that same name already
00:01:57.510 --> 00:02:01.390
exists on the selected server."
So really my only choice is to
00:02:03.180 --> 00:02:07.990
do something like this in order
to restore it with somewhat the
00:02:08.040 --> 00:02:11.860
same name or I can put it on a
different server. And I will
00:02:11.910 --> 00:02:13.690
just do that for now and click okay.
00:02:15.040 --> 00:02:18.380
And as you can imagine this will
take a little bit of time.
00:02:18.430 --> 00:02:22.520
It actually depends obviously
on the size of your database.
00:02:25.800 --> 00:02:29.210
Okay so it may have taken in my
case 5 or 10 minutes, I wasn't
00:02:29.260 --> 00:02:30.790
really keeping track of time here.
00:02:31.490 --> 00:02:34.270
But, let's go ahead and take a look
at what we have on our hands now.
00:02:34.320 --> 00:02:36.670
I'm going to the other server, I'm
going to take a look at databases
00:02:37.180 --> 00:02:38.090
and here we are.
00:02:38.790 --> 00:02:43.150
It's available, let me go ahead
and try to connect to it using
00:02:43.200 --> 00:02:46.620
SQL Server management studio.
00:02:48.540 --> 00:02:54.030
We'll use our server that
starts with the letter J
00:02:56.300 --> 00:02:57.490
and let's
00:02:59.940 --> 00:03:06.420
take a look now at Bob's Migration
Demo, let's take a look at
00:03:06.470 --> 00:03:10.740
the tables and let's go ahead and
00:03:12.630 --> 00:03:13.710
we see
00:03:14.990 --> 00:03:16.380
we get
00:03:19.080 --> 00:03:26.360
100 rows. So your data is there,
it's a pretty simple process,
00:03:26.410 --> 00:03:30.660
obviously this is one of Azure's
strengths, to make this a core
00:03:30.710 --> 00:03:37.420
feature of the platform and to
make it very easy to have your
00:03:37.470 --> 00:03:41.960
backups available and then to restore
based on that. So that's
00:03:42.010 --> 00:03:44.740
all I have in the way of backups
and restore. We will continue
00:03:44.790 --> 00:03:47.090
on in the next module.
I'll see you there, thank you.