ndzlogo-1-1
Loading ...

INDIA – HEADQUARTERS

INDIA

UNITED STATES

CANADA

Below are the steps to restore mysql database with innodb tables , without contacting r1soft.

Set up a temporary mysql “sandbox” instance  using the innodb files and the fil ebased backups
of  the database and create a mysql dump of the database.

1. restore these files to a temporary directory  /dbrestore

 /var/lib/mysql/ibdata1
 /var/lib/mysql/ib_logfile0
 /var/lib/mysql/ib_logfile1
 (restore to “alternate location” /dbrestore)

2. restore the database directory for the database that you want to
restore,
to the same alternate directory: (say database name database_name)

/var/lib/mysql/database_name
(restore to “alternate location” /dbrestore)

In case of cpanel, restore to alternate location /dbrestore will place the
files at /dbrestore/var/lib/mysql/database_name. In case of ensim, it will
place at  /dbrestore/home/virtual/sitexxx/fst/var/lib/mysql/database_name
.
So, after restoring to the alternate folder, you will need to copy the
database folder to /dbrestore/var/lib/mysql so that  at the end the files
will be at /dbrestore/var/lib/mysql/

 /dbrestore/var/lib/mysql/ibdata1
 /dbrestore/var/lib/mysql/ib_logfile0
 /dbrestore/var/lib/mysql/ib_logfile1
 /dbrestore/var/lib/mysql/database_name

3. Log into the target host with SSH, and cd to our temporary directory
(cd /dbrestore/)

4. Download and run the restore script

# wget https://repo.r1soft.com/supportscripts/restoreDB.sh (if its mysql 5.5 use restoreDB55.sh )
 # sh ./restoreDB.sh
(make sure you’re in the /dbrestore directory while executing the script
!!!)

5. On success, above step will create a mysql dump, database_name.sql  in
the /dbrestore folder, which can be imported over the database needed the
restore or to an alternate one.