Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer
    
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 1 '12 at 5: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 1 '12 at 5:46

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

share|improve this answer
1  
I can't really do that because the primary server doesn't have much disk space left –  mps_sudip Nov 1 '12 at 6:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.