Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
How to move data between two VPS
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

How to move data between two VPS

aliletalilet Member

How can I move data from one VPS to another? I have two VirMach VPS and wants to move data from /var/www.

Bonus points if I can also setup a cron job using that method to move data periodically.

Comments

  • bdlbdl Member

    rsync

  • JordJord Moderator, Provider
    edited May 23

    rsync

    BillingServ - Easy, simple, and hassle-free online invoicing solution. Contact us today.
    BaseServ Certified to ISO/IEC 27001:2013

  • KeeparKeepar Member

    I use a manual method, to do such tasks, first compress them on .tar then download them to the second server with wget command

    I know it is not practical but its the fastest and the easiest in my opinion

  • aliletalilet Member
    edited May 23

    Both push and pull for rsync are not working. The SSH port of both servers is 11941 and I am connected to both of them but neither push nor pull is working. In both cases I am getting connection timed out error.

    PULL

    rsync -e 'ssh -p 11941' [email protected]:/var/www/mywordpress/html/license.txt /home/mywordpressdata/
    ssh: connect to host xxx.xxx.xxx.xxx port 11941: Connection timed out
    rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
    rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.2]
    

    PUSH

    rsync -e 'ssh -p 11941' /var/www/mywordpress/html/license.txt [email protected]:/home/mywordpressdata
    ssh: connect to host xxx.xxx.xxx.xxx port 11941: Connection timed out
    rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
    

    ufw is installed on both servers and port 11941 is allowed for INCOMING connections.

    EDIT

    Ok I fixed the issue. I had to also allow OUTGOING connection on port 11941. But now I am getting a different error:

    rsync: mkstemp "/home/mywordpressdata/.license.txt.WtBOyf" failed: Permission denied (13)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]  
    

    EDIT

    Ok logging in as root fixed the issue. Even though I was using sudo it was not working but using root worked.

  • For small size data transfer ive used scp many times and works like a charm

    “The Mitigation is Spotless.” - Genius Guard, October 2016

Sign In or Register to comment.