Knowledge Base


Knowledge Base / XFilesharing Pro / How to ...

Transfering all files from one file server to another

10/04/2016 10:09 AM
Question

Answer

The best way is to copy all cgi-bin/uploads/ files from your source server to your destination server with the program named "rsync".

Here is a syntax of running rsync under root SSH console (you have to do that on your source server):

rsync --progress -ave ssh your_cgi_dir/uploads/ root@destination_ip:/destination_cgi_dir/uploads/

After the transfer completes, here is an SQL syntax that you have to run in your main server's MySQL console in order to let the script know that the files were transferred to a new server (please don't forget to take a backup):

UPDATE Files SET srv_id=dest_srv_id WHERE srv_id=source_srv_id;

Hint: you can find srv_id of both servers in /?op=admin_servers of your XFileSharing site.