3

I need to move my site from one linux VPS to another VPS, and I just need to copy over the public_html folder and probably the databases, however it is quite large(over 20gigs) so ftp is a bad choice. I was thinking of using rsync (I have root ssh for both servers vis su, but different user/pass), but I am a newb to this and all rsync tutorials I found were for local system to remote server or vice versa, I need to know how to set it up between two servers(I mean how do I provide the user/pass and directory paths for the second server?). And also, is there any other easier or simpler way where I can setup the server-server transfer without keeping another pc in between? Cause I am afraid of breaking the transfer due to power failures which is quite frequent in my region.

mps_sudip
  • 57
  • 2
  • 4

2 Answers2

1

Since you have root access, you can ftp (or sftp) from one server directly to the other. Or you could log into server1 and run rsync from cmd line like this:

rsync -av /var/www/html root@192.168.0.100:/var/www/html

replace '/var/www/html' with your folder path and replace '192.168.0.100' with your server2 ip address

user16081-JoeT
  • 1,948
  • 11
  • 18
  • Thanks, but what if I can't directly use root? I have to log in as a vps user then `su` to root – mps_sudip Nov 01 '12 at 05:34
  • well you could temporarily allow root logins by editing sshd_config, or else you need to create the folder on server2 with the permissions so that the vps user can write the files there, then run rsync command on server1 to connect to server2 and replace 'root' with vps username. – user16081-JoeT Nov 01 '12 at 05:46
0

Or you can just tar the directory and use wget on other server to download it on there :) depends on your situation though, I wouldn't do that if I have super secret files to move