Results 1 to 9 of 9
  1. #1
    Join Date
    May 2009
    Location
    US
    Posts
    2,502

    Question What are all of the mysql directories?

    Hi,
    So one of my hypervm servers, got a lot of corrupt binaries in the operating system, CentOS.
    My datacenter has plugged in an external hard drive so I can backup my files there so the DC can reformat the server.
    I know that I will need to copy: /vz and /home and /etc

    But.. the one important thing is the hypervm MySQL database! What do I have to backup? /var/lib/mysql ? any other directories?

    And how would I restore that MySQL to the new server, when hypervm is installed and the server is formatted?

    I will be installing hypervm on the server again when it's done formatting.

    I know that hypervm has exploits, so I am going to stop hypervm once I get the server up and running back on its feet. And then switch to VZWave when the production version comes out.

    So can anyone shed some light into this? All your help is appreciated!

  2. #2
    Hello,

    Backups of Mysql will be available in /var and you can use rsync tool to copy it to your server from backup.

  3. #3
    Join Date
    May 2009
    Location
    US
    Posts
    2,502
    Quote Originally Posted by linux-engineer View Post
    Hello,

    Backups of Mysql will be available in /var and you can use rsync tool to copy it to your server from backup.
    Hi,
    It will be /var/lib/mysql correct? Do I just replace my new reformatted server with my old /var/lib/mysql? Is there any other directories that I might need?

  4. #4
    Join Date
    Mar 2004
    Location
    Chennai India
    Posts
    115
    For mysql data , you just need to copy /var/lib/mysql alone.
    miOOt Chat Solutions
    live chat Software for web hosting Customer Service
    Importance of Live Chat Software for Web Hosting Business

  5. #5
    Join Date
    May 2009
    Location
    US
    Posts
    2,502
    Quote Originally Posted by mioot View Post
    For mysql data , you just need to copy /var/lib/mysql alone.
    Just that? Any more directories?

  6. #6
    Join Date
    Jul 2005
    Location
    New Jersey, US
    Posts
    1,507
    Mysql is traditionally in /var/lib/mysql but it could have been changed so don't just go by the directory. Look in that directory first to make sure it's all there before automatically assuming it.
    PlatinumServerManagement (also known as PSM)
    The OLDEST and LARGEST and MOST TRUSTED server management provider in the USA, with 15+ employees and growing!
    Providing quality support for OVER 18 years! Currently supporting over 3,000+ servers monthly!

    www.PlatinumServerManagement.com Proud member of the NJ BBB & Chamber of Commerce & Authorized cPanel Partner.

  7. #7
    Join Date
    May 2009
    Location
    US
    Posts
    2,502
    Quote Originally Posted by ServerManagement View Post
    Mysql is traditionally in /var/lib/mysql but it could have been changed so don't just go by the directory. Look in that directory first to make sure it's all there before automatically assuming it.
    Alright, I'm assuming the mysql will be the same user/pass as before if I move the /var/lib/mysql?
    Do I just replace the new servers /var/lib/mysql with the old ones?

    Thanks!

  8. #8
    Join Date
    Aug 2008
    Location
    Shoreline WA
    Posts
    160
    A few more little tips. Make sure MySQL is not running when moving the raw data files. The MySQL usernames and passwords are stored in MySQL's own database (usually /var/lib/mysql/mysql/), so yes, all of that will be preserved. You should of course also make sure you are going to restore the files to the same version of MySQL.
    Jonathan Kinney
    Data Systems Specialist
    Advantagecom Networks, Inc.
    http://www.simplywebhosting.com

  9. #9
    Join Date
    May 2009
    Location
    US
    Posts
    2,502
    Yep.. that's it, /var/lib/mysql did the job! Thanks for all your help!

Similar Threads

  1. Need Help, I moved Mysql from /var to /backup/mysql, mysql is no longer working
    By pcnet21 in forum Hosting Security and Technology
    Replies: 4
    Last Post: 05-09-2009, 01:58 AM
  2. Server2Server FTP whole directories and sub-directories
    By Gigaron in forum Hosting Security and Technology
    Replies: 1
    Last Post: 12-23-2007, 05:46 PM
  3. Three directories - Cars, Baseball and Directory of Directories
    By Stevie in forum Domain Name with Web Site Offers
    Replies: 3
    Last Post: 06-08-2007, 01:36 PM
  4. Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    By manisha_khtri in forum Hosting Security and Technology
    Replies: 2
    Last Post: 06-05-2006, 10:05 AM
  5. Replies: 5
    Last Post: 05-11-2004, 12:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •