Restoring server w/ crude backup.. URGENT HELP NEEDED

rabidkevin

Member
May 14, 2004
14
0
151
My harddrive was corrupted, and stuck in read-only mode, therefore I could not create tar.gz cpanel backup archives.

My host Installed new harddrive, installed New OS (Centos 4.2) and reset everything to a brand new server.

They then mounted my bad drive to /backup so I could pull data off of there.

I have having quite a difficult time trying to restore my server via this method.

My old HOME directory is located in /backup/7/
so I 'cp -R -p /backup/7/homedir /home'
Only problem is that I have numbers for usernames for some reason... So is there a way to mass fix the file permissions of all home users?

Secondly, I got the mysql data moved over from /var/lib/mysql, but this does not include accounts. Is there any possible way to restore the username/passwords as well?

Thirdly, The email data in the /home/homedir/mail is there, but I do not see the email accounts listed in cpanel for the website. I can't figure out where this information is stored.


If there is an easier way to do all of this, someone please advise me.
 

rpmws

Well-Known Member
Aug 14, 2001
1,787
10
318
back woods of NC, USA
rabidkevin said:
My harddrive was corrupted, and stuck in read-only mode, therefore I could not create tar.gz cpanel backup archives.

My host Installed new harddrive, installed New OS (Centos 4.2) and reset everything to a brand new server.

They then mounted my bad drive to /backup so I could pull data off of there.

I have having quite a difficult time trying to restore my server via this method.

My old HOME directory is located in /backup/7/
so I 'cp -R -p /backup/7/homedir /home'
Only problem is that I have numbers for usernames for some reason... So is there a way to mass fix the file permissions of all home users?

Secondly, I got the mysql data moved over from /var/lib/mysql, but this does not include accounts. Is there any possible way to restore the username/passwords as well?

Thirdly, The email data in the /home/homedir/mail is there, but I do not see the email accounts listed in cpanel for the website. I can't figure out where this information is stored.


If there is an easier way to do all of this, someone please advise me.
you have a mess!!! but don't panic ..what you need should be on that box. You are going to need somone that has done this many times to help you. I am only posting to get your post noticed. good luck!
 

rabidkevin

Member
May 14, 2004
14
0
151
Yea, definatly messy.. and I have over 75 websites to get back online.

So far I managed to:

restore a /home directory (had to manually fix all the user:group permissions)
got email restored
restored mysql data, but NOT the usernames/passwords (basically have to re-create the same username/pw used before, and then the mysql data shows up in phpmyadmin).

Mind you, this is only on 1 website so far, as it is a tedious and long task..

my problems now are these:

I am hesitant to move any files from the /etc folder such as passwd, shadow, etc. Should I just re-create these accounts in WHM, then overwrite the files w/ the data from the old /home directory?

Also hesitant to drop the entire /var/named folder with all my dns entires but I think that would be less problematic.. and easy to clean up..

Still unsure if i can restore the mysql usernames/password to go along with the data.. any info on that would be very helpful.