Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    83

    Default How to restore mysql databases from /var/lib/mysql/user_database/ files only

    Hi,
    as the title asks. I recenlty had a hardrive failure and luckliy I can still access certian directories on this drive. I can still access the /var/lib/mysql/ direcoty which holds all the users databases and have backed all these up using tar.

    Now what I need to know is how do you restore these database files to another server? I tiried simply untar'ing one of these to a new server - for one single user - and it stuffed up Mysql - it went offline.

    So how can I get these database files to fully work on a new server? Please any help would be greatly appreciated.

  2. #2
    Member
    Join Date
    Jul 2004
    Posts
    496

    Default

    Login to the old server via ssh and use rsync to transfer the databases to the new server. Example;
    #rsync -avz --delete -e ssh /var/lib/mysql new_server/var/lib/mysql

Similar Threads & Tags
Similar threads

  1. mod security gone crazy after /var/lib/mysql restore
    By Silver_2000 in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 11-02-2009, 06:16 PM
  2. Replies: 1
    Last Post: 07-07-2009, 02:08 PM
  3. .gz files in /var/lib/mysql
    By alex@itomic in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-20-2008, 08:18 PM
  4. /var/lib/mysql/servername-bin files
    By verdon in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 09-13-2007, 02:01 PM
  5. server#-bin.### files in /var/lib/mysql/
    By fishfreek in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-27-2004, 02:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube