restore da from crashed hd

mattlovell

Verified User
Joined
Aug 21, 2005
Messages
23
Hi
My server just crashed, we needed to reinstall the osand direct admin
I have the old hard disk attached

any tips on how to get my server back up with da as before?

I assume like using backup files?

please help!!!

thx
Matt
 
To create backups, I have done this using a rescue cd NOT for a second mounted drive so this is untested. But you should be able to login with ssh and ...
Code:
chroot /mounted/drive 
Start mysql
echo "action=backup&local_path=/home/admin/admin_backups&owner=admin&type=admin&value=multiple&when=now&where=local&who=all” >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq
 
in case anyone follows me...
I ithnk you all missed the point there were no backups just the crashed disk and a new install of da

it took a few hours but I rescued the server and lost no data, at the same time sneaked in a upgrade from old da apache 1.3 to new custombuild

I copied all the files you see in the system backup
going through very carefully

this got me all the mysql files, users, the home files

but this left me with dovecot not working (cause its new) and apache not working
- I went through the custom httpd files and removed the port and change the user etc to the new syntax

(I created a new account with an email - so I knew what things should look like!)

- I then used the da faq's to convert to dovecot and update all the email passwords to carry a uid

basically if you are in the disaster I was...
- get most of the old files across and whats still not working read the da faq's
which are really quite helpful!
- also set up a test user, so you will have one working - this really helped when I was missing the custom httpd files - they are not included in httpd.conf any more but in the extras folder
(Oh i forgot to say leave the NEW httpd.conf!)

Anyway if you find yourselves in a similar position with loads of users crying, no time and stressed - I am around I'll try and help!

good luck
m
 
in case anyone follows me...
I ithnk you all missed the point there were no backups just the crashed disk and a new install of da

Evidently you did not read my post above about how to create DA backups from another hard drive.
 
hi yeah you are right
i missed that
it might have been worth a try
unfortunately as it was time urgent - i had finished the repair before i got your post!
thanks though
m
 
To create backups, I have done this using a rescue cd NOT for a second mounted drive so this is untested. But you should be able to login with ssh and ...
Code:
chroot /mounted/drive 
Start mysql
echo "action=backup&local_path=/home/admin/admin_backups&owner=admin&type=admin&value=multiple&when=now&where=local&who=all” >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq



Got this:


Code:
[root@server ~]# echo "action=backup&local_path=/home/admin/admin_backups&owner=                                                      admin&type=admin&value=multiple&when=now&where=local&who=all. >> /usr/local/dire                                                      ctadmin/data/task.queue
> /usr/local/directadmin/dataskq
>
[root@server ~]# echo "action=backup&local_path=/home/admin/admin_backups&owner=admin&type=admin&value=multiple&when=now&where=local&who=all.
>
[root@server ~]#
 
Did it create the backups on the chrooted drive? If so, just restore them in the new drive.

Jeff
 
I suppose you know that /mounted/drive isn't the name you use. If someone has mounted the drive for you, then you need the path they've given you; if you've done it yourself, you need to create a mountpoint and mount the drive to your mountpoint.

After that, what error do you get when you do the chroot?

Jeff
 
Back
Top