كود:
1. Transfer to new server
Telnet/SSH into machine1, and from the command prompt type the following:
cd /path/to/yourbackupdirectory
Then type:
ftp MACHINE2
Replace MACHINE2 with the host name (eg. www.example.com ) or IP address (eg. 192.168.0.0 ) of your new server. This should open a connection and ask for your username/password, then it should say ftp>
Type the following, hitting enter after each line:
bin {enter}
cd /path/to/newdirectory {enter}
put dump.sql {enter}
It should take between 20 seconds and a few minutes depending on the size of the file.
Now type:
close {enter}
quit {enter}
verify dump.sql is in the /path/to/new area on the new server.
2. Restore to new server
Telnet/SSH into machine2
create a database on the mysql if necessary (ask your server admin for help with this as it varies from machine to machine)
at the prompt type:
mysql -uUSERNAME -pPASSWORD newdbname < /path/to/dump.sql
this takes a couple of minutes depending on your database size, but you can track the progress either by FTP (checking the /mysql/data/newdbname and see the files appearing) or by phpMyAdmin (you should see the files appearing there)
when it is completed, it will bring you back to the prompt
واذا مافهمت حط لي مسنجرك وان شاء الله اساعدك