hi everyone this will be a short
tutorial on how to backup my SQL
database we will be doing it in Linux
terminal and to backup database we need
my skill dump command type in my skill
down press enter and you will see common
usage of this command first let's back
up a single database by typing my skill
down space and now we need to supply an
option list such as username hostname
port and so on and so forth so let's
start with username type in - you space
username - H host name - B to enter the
password and the last thing is database
name let's say DB 1 then greater than
sign which means a redirect all output
into a file and let's say the file name
is DB 1 dot SQL press enter enter the
password and now we've created backup of
a single database let's check it by
getting listing I'll ask - L H file name
press enter and you can see we've just
created a backup now let's try to back
up multiple databases to do that add an
argument - - databases the
and simply write list of your databases
which are spaced separated in my case it
is WR db2 and let's say two and the
score DB which is the file name press
ENTER and we'll just create a backup of
two databases
let's get listen again
next let's try to back up all databases
at once without supplying their names to
do that type in the last argument as - -
all - databases and change filename for
example all DB press enter enter the
password
let's get listing again and the last
thing which we can use here is to backup
few databases are a few tables of
particular database to do that change
the last argument which is database name
first DB one in my case and then list of
your tables separated by space let's say
I have one table WP posts post space WP
and the score users and let's say this
will be two tables
press enter enter the password and we
just created backup of two particular
tables so now we have all our backups in
place let me clear screen and the next
step is how to restore these backups
let me get listing first if we want to
restore all our databases we need to
actually to restore databases you need
to use MySQL command so it is no longer
my skill dump so type in MySQL space and
optionally should be the same which is -
you username - H host name - P - restore
all databases simply put less than sign
which means we will redirect in Reverse
from the file into the database and then
file name which is all db2 SQL press
enter enter the password and we've just
restored all databases at once to
restore one particular database which is
DB 1 dot SQL you need to add + / 1
parameter which is database name where
you want to restore it I want to restore
it to GP 1 and press enter enter the
password
and we've just restore a single database
now let's restore to databases it is
similar to restoring all databases just
simply change the file name and press
enter enter the password again and we've
just restored two different databases
and the last thing is we need to restore
our two tables
it is similar also typing the database
where you want to restore the tables I
want to restore it into db1 and simply
change the file name which is two tables
press enter enter the password oops I
mistyped it I will try again and we have
just restored our two tables which works
fine I hope this was useful for you and
hope to see you next time