Get Paid to Participate - up to $1 per post!     Twitter     Facebook     Google+
Hosting Discussion
 

Hosting Discussion > Web Hosting Forums > Web Hosting Discussion > Creating another MYSQL instance and restoring DB (R1soft)
forgot password?



Reply


Old
  Post #1 (permalink)   02-25-2017, 11:34 PM
HD Newbie
 
Join Date: Feb 2017
Location: Oman
Posts: 38

Status: hostgliders is offline
1. Restore the raw DB files from the recovery point:
ib_logfile0 ib_logfile1 ibdata1 /var/lib/mysql/mysql /var/lib/mysql/_dbname

The log files, ibdata and mysql tables must always be restored in addition to the actual user database(s).

Important: Restore to an ALTERNATE location (do NOT overwrite existing location). Use e.g. /var/lib/mysql_tmp (ensure there is enough space). Folder needs to have ownership by mysql:mysql.

2. Start a temporary MySQL instance
Replace the path with where the data was restored.

mysqld_safe --socket=/var/lib/mysql_tmp/mysql.sock --port=3307 --datadir=/var/lib/mysql_tmp

You now have a separate MySQL server running with the data from the restored backup. It is now posssible to connect to the instance using port 3307 or the socket path.

3. Generate DB dump
To create a database dump from the temp instance, use this command (replace path to socket with actual path):

mysqldump --socket=/var/lib/mysql_tmp/mysql.sock dbname > dbname.sql

4. Cleanup
Stop the temp instance by killing the process and delete the restored files.
__________________
Host Gliders
 
 
 


Old
  Post #2 (permalink)   02-28-2017, 01:06 PM
HD Addict
 
Join Date: Nov 2008
Location: Central Indiana, USA
Posts: 187
Send a message via AIM to MikeDVB Send a message via MSN to MikeDVB Send a message via Skype™ to MikeDVB

Status: MikeDVB is offline
Yeah... What about it?

This is the hosting discussion section - I'm not sure if there's a 'how-to' section but if so - it seems like that would be a better place for this .
__________________
Michael Denney - MDDHosting LLC - Professional Hosting Solutions
HA Shared Plans Check them out! Old plans still available.
Shared, Premium, Reseller, and VPS
http://www.mddhosting.com/
 
 
 


Old
  Post #3 (permalink)   02-28-2017, 02:25 PM
HD Management Staff
 
Artashes's Avatar
 
Join Date: Apr 2003
Posts: 9,590

Status: Artashes is online now
Quote:
Originally Posted by MikeDVB View Post
I'm not sure if there's a 'how-to' section but if so - it seems like that would be a better place for this .
We might have to create one to move these there.
 
 
 


Old
  Post #4 (permalink)   02-28-2017, 06:43 PM
HD Addict
 
Join Date: Nov 2008
Location: Central Indiana, USA
Posts: 187
Send a message via AIM to MikeDVB Send a message via MSN to MikeDVB Send a message via Skype™ to MikeDVB

Status: MikeDVB is offline
Quote:
Originally Posted by Artashes View Post
We might have to create one to move these there.
That's probably not a bad idea - although a little oversight probably would be advised .
__________________
Michael Denney - MDDHosting LLC - Professional Hosting Solutions
HA Shared Plans Check them out! Old plans still available.
Shared, Premium, Reseller, and VPS
http://www.mddhosting.com/
 
 
 


Old
  Post #5 (permalink)   03-07-2017, 11:59 PM
HD Newbie
 
Join Date: Aug 2016
Posts: 33

Status: Wanah is offline
Nice tutorial

+1 for a tutorial section
 
 
 


Old
  Post #6 (permalink)   03-08-2017, 07:56 AM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 586

Status: ughosting is offline
Just to point out, if you are using R1Soft, this can be achieved with a few mouse clicks, you don't actually need to know how to do this, as the agent will do it for you!

Using a plugin (we do) your customer can also restore their own files and databases.
__________________
DDoS Protected, LiteSpeed + LiteMage on CloudLinux with SSD Disks, R1Soft, Softaculous, SIteBuilder, BitNinja, LetsEncypt & Patchman
UnixGuru: Accounts with 1-16 CPU Cores, 2-32GB RAM. Why use a VPS?
█ Choose from Shared, Reseller and Elastic-Sites Hosting
 
 
 


Old
  Post #7 (permalink)   03-08-2017, 09:45 AM
HD Newbie
 
Join Date: Jan 2017
Posts: 26
Send a message via Skype™ to HosterDaddy

Status: HosterDaddy is offline
That would be great if you could explain little bit more about the tutorial like what it is? what its use etc.
__________________
HosterDaddy.com
High Performance Widnows VPS
#1 WebHosting Provider
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: