Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    Angry Restoring a backup

    I have a full backup off site that. I am trying to restore 1 user account through the Web Host Manager.

    I separated the user file and uploaded it to my servers home dir. Ran the restore single user option in WHM and it restored my home directory, but not my MySQL databases.


    I talked to my buddy who setup the backups and he said that there was an option to break down the mysql backups by site and he chose not to do that. So he believes thatw e would have to do a full restore to get the 1 site back up.

    Is that true that the backups for databases fr all sites would not be broke down in the sites username folder?
    I noticed that there is a mysql folder in the user.tar.gz file, but it is empty.

    Is there anyway to split the DB backup if I can find it so that I can restore just one account?

    I am afraid to do a full restore because I don't want to risk bringing down my other users sites. If I do have to do a full backup, is there a way I can verify that the mysql data is in the backup file before I attempt this?

  2. #2
    Member UBERHOST's Avatar
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    102

    Default

    If everything is good except for the MySQL database(s) then you can use phpMyAdmin on the origin machine to export each db, then create an empty db using cPanel on the destination server, then open phpMyAdmin and import the db.

    The best method, however, is to go into shell on each machine and do the following, first on the old server:

    mysqldump --opt -u user_name -p user_dbname > filename.sql
    (you'll be prompted for the db user's password)

    Transfer the SQL file to the new machine, create an empty MySQL db, then enter:

    mysql -u user_name -p user_dbname < filename.sql
    (you'll be prompted for the db user's password)

    If you do not want to do it that way, then delete the cPanel account on the new server, and transfer it using

    Main >> Transfers >> Copy multiple accounts/packages from another server

    Make sure both servers are running WHM 11.23+ (most reliable transfers) and fill in the required information. Account Copier will pull a list of accounts from the origin machine, but you only need to transfer the one account you want. If the Package has not been setup on the new server, you can transfer that as well. This function will reliably set up the account on the new server with all databases intact. Once done, just check the DNS zone to make sure it reflects the proper records, and edit if necessary.

    HTH,
    Rick

    click logo to visit us for dedicated
    cPanel servers and more

  3. #3
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    Default

    I only have 1 server and the original database was destroyed. All I have now is the full backup form cpanel.

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    In this case you can look on your remote storage for the "mysql" directory file. I assume this would be a compressed file called dirs.

    Anyway, grab that file and unpack it so you can view the mysql directory called:
    _var_lib_mysql_

    Once inside there, you can simply find the account you need and copy that over to your live /var/lib/mysql directory.

    Don't forget to change the ownership to mysql.mysql and double check the permissions.

    Outside of the remote backups, I would still suggest keeping a local copy of your backups on hand if you have the space.

  5. #5
    Registered User
    Join Date
    Mar 2006
    Posts
    4

    Default

    The MySQL folder for this user is empty. Is there something I need to change in WHM to have the backup include a MySQL backup in the future?

    For this site I am just going to start form scratch. I was a new site, but I didn't want to lose a weeks worth of work, but it looks like that is what I will have to do.

    As for the remote storage, this is actually a quad core server that my partner hosts at his house. I can also have the backups go to my local ftp. I just want to make sure that I have the MySQL data if one of our large sites goes down.

  6. #6
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    You would want to look at the backup configuration:

    whm > backup > configure backup

    and check the radio button for:
    Per Account and Entire MySQL

    Since your remote storage is a friendly area and not NAS, you should consider creating local incremental backups and simply rsync the data to the remote location. This would save a lot of cpu time and bandwidth by not packing and over writing every account daily.

    Only changed files will be backed up and not entire accounts after you run the initial backup.

Similar Threads & Tags
Similar threads

  1. backup restoring
    By Suleman in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-24-2007, 01:07 PM
  2. need some help restoring a backup
    By heyjohnboy in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-07-2005, 02:53 PM
  3. Restoring a backup
    By WaysoftheJedi in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-11-2005, 02:39 AM
  4. Restoring a backup
    By Kardon in forum New User Questions
    Replies: 1
    Last Post: 05-21-2004, 11:35 PM
  5. [Restoring] Anyone has experience with WHM backup restoring ?
    By Radio_Head in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-04-2003, 02:19 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube