directadmin恢复

Step 1

Run System Backup on the old server.

Admin Tools >> System Backup

 

We will be backuping home directories and mysql db’s manually so Uncheck and unselect the following options on System Backup

Add user home directories to directory list below

Backup httpd data

Backup MySQL Databases

Check and Select

Backup DNS data

Backup Directories and Files listed below

All directories/files listed in bottom section of the System Backup

now click on the Run System Backup Now icon . The backup will be stored mostly in /home/backup ( it will depend upon how you have set it in DA )

Step 2

rsync the system backup to the Newserver.

[email protected]:~# rsync -avurz -e ssh –delete /home/backup [email protected]_IP:/home/backup

Step 3

On the Newserver restore the system backups one by one manually.

For example, for restoring your /etc/virtual directory,

[email protected]:~# cd /etc
[email protected]:~# tar xvzfp /home/backup/<backup_date>/custom/etc/virtual.tar.gz

Please check here for the complete paths and files used on a DirectAdmin system.

( Do take extra care while restoring /etc/passwd /etc/shadow /etc/group etc.. )

Step 4

Synchronise the home directory

[email protected]:~# rsync -avurz -e ssh –delete /home [email protected]_IP:/home

Step 5

Backup and restore the mysql DB’s

On Oldserver

[email protected]:~# cat /usr/local/directadmin/conf/mysql.conf

Get the da_admin password from the above file

[email protected]:~# mysqldump -u da_admin -p  –all-databases > /root/all_databases.sql

[email protected]:~# scp /root/all_databases.sql [email protected]_IP:/root

On Newserver

[email protected]:~# cat /usr/local/directadmin/conf/mysql.conf

[email protected]:~# mysql -u da_admin -p < /root/all_databases.sql

Step 6

Use the ipswap script to change the Oldserver IP’s

[email protected]:~# cd /usr/local/direactadmin/scripts/

[email protected]:~# ./ipswap.sh Oldserver_IP  Newserver_IP

Step 7

Update the nameservers to the Newserver IP’s.

Step 8

To resolve all the queries correctly to the new server . You will have to setup the multi server dns clustering on the new server

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用*标注