XFileSharing Pro - could anyone tell how to move old sever files to new sever?

Message
Author
free515
Posts: 17
Joined: Apr 03, 2012 11:13 am

could anyone tell how to move old sever files to new sever?

#1 Postby free515 » Sep 22, 2012 3:59 am

could anyone tell how to move old sever (A) files to new sever (B)?

as i do not want to use the old sever (A) .

i have about 2tb on the old sever thanks

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#2 Postby trinsic » Sep 22, 2012 5:27 am

On new server run in SSH:

Code: Select all

rsync -av -e ssh username@oldserverhost:/var/www/cgi-bin/uploads/ /var/www/cgi-bin/uploads/
Change username@oldserverhost to the settings of your old server and the folder to the correct locations if they're different.

Once completed run this in MySQL:

Code: Select all

UPDATE Files SET srv_id=2 WHERE srv_id=1
Where server 1 is the old server and server 2 is the new server.

http://pastebin.com/raw.php?i=tFgMgj0e

trinsic
Posts: 149
Joined: Dec 21, 2009 9:24 am

#3 Postby trinsic » Sep 22, 2012 5:32 am

The good thing about rsync is you can resume it and if it crashes it'll simply start where it left off. If you want you can run it in a screen and close SSH.