Restore from system files

tinatorasd

New member
Joined
Apr 29, 2010
Messages
7
Hello everybody,

I had problems in the server's hard drive and had to replace it. After the replacement I went to restore DA accounts. The problem is that I don't have a backup file to restore but I have to use server files instead. Is there a way to do that so I don't need to restore each account alone (by copying it's file and
backing up and restoring it's databases) or that is a dream :(

Thank you for you valuable help.
 
To simplify the matter, is there a script that can be used to make an admin backup from existing DA files.
 
This is not a step by step guide but an outline.

What you can do is mount the old drive and then chroot to the old drive and then make regular DA backups.

Code:
# Backup all users
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 &

Then run the restore.

Then if mysql is the same major version you can copy all the mysql files from the old drive to the new.
 
Thanks alot floyd.

One another question, where can I find the files of the databases and what is the proper way to copy them?
 
If you do not know where mysql keeps its files then I lack confidence that you will be able to do this on your own.

Mysql usually keeps its files in /var/lib/mysql
 
If you do not know where mysql keeps its files then I lack confidence that you will be able to do this on your own.

Mysql usually keeps its files in /var/lib/mysql

:) :)

I am trying to learn. Thanks floyd.

Now, the found mysql files. How to transfer the databases? Is it just copying all files and directories the the /var/lib/mysql directory to the new hard disk in the corresponding location or it needs more work?
Also, will the databases copied be ready for use upon copying them and accessed from DA?

Thanks a lot floyd for you appreciated effort.
 
Back
Top