in this video I'll walk you through how
to backup and restore a database in
sequel server 2012 to backup a database
first launch management studio and
connect to your server instance then
expand databases and right click on the
database that you want to backup go to
tasks and click on backup first make
sure that the database selected in a
drop-down is the correct database you
want to backup under backup type we have
the option to perform a full a
differential or a transaction log backup
a full backup backs up the entire
database including the transaction log
it includes all the data in the database
but the problem with full backups is
that the larger a database gets the
longer it takes for these backups to
complete and also the size of the backup
file becomes larger so we have the
option to create differential backups
now this type of backup it only backs
out the data that was changed since the
last full backup since it's only taking
the changes these differential backups
are usually much smaller and run faster
for the transaction log backup option
this backs up the contents of your
transaction log and it backs up
everything since the last time the
transactional log was backed up the
transaction log contains all the
transactions executes against the
database since the last time it was
backed up this gives you the ability to
recover the database to a specific point
in time
now since the differential and
transactional log backups don't backup
the full database you do need a full
database backup in order to restore your
differential and your true
log backups a four-hour backup will
select full and specify the location
where we want to store the backup here
I'm going to create my backup in the C
backup folder and call it test DB 1 bak
click OK and it will create the backup
for us so now if we go to the backup
folder under seat backup we see that it
just now created our test DB back to
restore this backup
we can go back to management studio
right click on databases and select
restore database so the first step is to
select the source and the source will be
the backup file that we just created so
select device and let's navigate to that
location and select it
the next step is to specify the
destination and by default is going to
keep the original database name testdb 1
and if you leave it like this it's going
to restore over this database if you
don't want to wipe out this database
what you can do is restore as a
different database name so we can
restore as tests db2 and the other thing
is we need to change the physical file
name for test db2 so click on files and
under restore as if we scroll all the
way to the right you'll see that the
physical file name is test DB 1 2 MDF we
just want to change that to test DB to
the MDF and the same thing for the log
file test DB to underscore log the LDF
and once you have that we're set and we
could click OK to begin the restore now
if you go back to management studio and
refresh databases you'll see that both
tests DB 1 and testdb 2 are available
for you to use