Howdy, Stranger!

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


How to move data from one vps to another vps using rsync
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to move data from one vps to another vps using rsync

seenuseenu Member
edited May 2016 in Help

Hello,

I want to move data from one vps to another vps using rsync and following this tutorial

https://lowendbox.com/blog/how-to-migrate-a-hosted-server-in-5-easy-steps-with-rsync/

but when i execute command mentioned there.

it throws error

Unexpected remote arg: root@SRC-IP:/*
rsync error: syntax or usage error (code 1) at main.c(1348) [sender=3.1.0]

anyway to fix that?

Comments

  • MunMun Member
    edited May 2016

    It is possible your versions of rsync are different.

    I personally run:

    
    New-Server# rsync -rvz -e 'ssh' user@your-old-server:/path/to/files /new/path/to/files/ --progress
    
    

    Further, the guide listed is for migrating the whole VPS and not just a few bits of the data.

  • ehabehab Member

    change root@SRC-IP to what you use in the other vps

  • seenuseenu Member

    @ehab, i am already doing that :)

  • ehabehab Member

    oky, one last comment from me is remove * and see what happens.

  • seenuseenu Member

    @Mun

    both using rsync version 3.1.0 protocol version 31

  • seenuseenu Member

    @ehab, same error

    however if i remove last '/' its connecting

    but console is like

    sending incremental file list
    rsync: link_stat "/root/–numeric-ids" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/etc" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/etc/network" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/proc" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/tmp" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/sys" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/dev" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/mnt" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/boot" failed: No such file or directory (2)
    rsync: change_dir "/root//–exclude=/root" failed: No such file or directory (2)
    
  • seenuseenu Member

    @Mun,

    Actually i want to move complete vps data (i.e. moving from one provider to another)

    thats why following that guide.

  • FalzoFalzo Member
    edited May 2016

    you probably got lost by copy and pasting that command. those have to be double dashes for the exclude options, like --exclude=

    rsync -auHxv --numeric-ids --exclude=/etc/fstab --exclude=/etc/network --exclude=/proc --exclude=/tmp --exclude=/sys --exclude=/dev --exclude=/mnt --exclude=/boot --exclude=/root root@SOURCE:/ /
    Thanked by 3seenu vimalware ehab
  • seenuseenu Member

    Thank you so much @Falzo

    that did the trick

  • tommytommy Member

    Hope someone put rm -fr somewhere there ;)

  • seenuseenu Member

    lol

  • @tommy said:
    Hope someone put rm -fr somewhere there ;)

    You're just being evil. And a horrible person :(

  • tommytommy Member

    yup, I am :)

  • elgselgs Member

    If you are using OpenVZ, ask your provider if they can help you with vzdump, or the qcow2 file if KVM.

  • seenuseenu Member

    @elgs i got it running with rsync with help of Falzo comment

    I wish, there is an option for post starter to close/lock thread.

  • user123user123 Member

    @jarland

    @seenu said:
    @elgs i got it running with rsync with help of Falzo comment

    I wish, there is an option for post starter to close/lock thread.

  • jarjar Patron Provider, Top Host, Veteran

    We don't have enough activity here to lock threads every time someone decides they're done with a conversation :P

  • user123user123 Member

    @jarland said:
    We don't have enough activity here to lock threads every time someone decides they're done with a conversation :P

    It's not my birthday today :)

  • leave rsync

    Follow this steps,

    Compress zip with encryption

    zip -e -r Urzipname.zip files
    So,
    zip -e -r let.zip *
    It will ask for password

    Move to via http or ftp

    Http:

    Put following file my code

    Mv let.zip /htdocs

    And in remote vps get file via wget

    Ftp: (my suggestion)

    Put zip in ftp accessible folder

    And get that file via wget

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.
    Hope it will help you

    Thank You!
    VP-

  • user123user123 Member

    @vishalpatelz said:
    leave rsync

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.

    Rsync is far more secure than FTP, since FTP sends all data as plaintext, while rsync is encrypted.

  • @vishalpatelz said:
    leave rsync

    Follow this steps,

    Compress zip with encryption

    zip -e -r Urzipname.zip files
    So,
    zip -e -r let.zip *
    It will ask for password

    Move to via http or ftp

    Http:

    Put following file my code

    Mv let.zip /htdocs

    And in remote vps get file via wget

    Ftp: (my suggestion)

    Put zip in ftp accessible folder

    And get that file via wget

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.
    Hope it will help you

    Thank You!
    VP-

    You will be frustated if there is not enough space when your compress progress at 99%

  • @user123 said:

    @vishalpatelz said:
    leave rsync

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.

    Rsync is far more secure than FTP, since FTP sends all data as plaintext, while rsync is encrypted.

    Well, that's true but I try to come up with alternative methods.

  • @robohost said:

    @vishalpatelz said:
    leave rsync

    Follow this steps,

    Compress zip with encryption

    zip -e -r Urzipname.zip files
    So,
    zip -e -r let.zip *
    It will ask for password

    Move to via http or ftp

    Http:

    Put following file my code

    Mv let.zip /htdocs

    And in remote vps get file via wget

    Ftp: (my suggestion)

    Put zip in ftp accessible folder

    And get that file via wget

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.
    Hope it will help you

    Thank You!
    VP-

    You will be frustated if there is not enough space when your compress progress at 99%

    Yes, it's annoying

  • dailydaily Member

    @user123 said:

    @vishalpatelz said:
    It is way more secure.

    Rsync is far more secure than FTP, since FTP sends all data as plaintext, while rsync is encrypted.

    vishalpatelz said: Well, that's true but I try to come up with alternative methods.

    What? You have no idea what you're talking about @vishalpatelz. You say FTP is more secure, when it is obviously not. Then once called out on it, you claim you know but are just offering alternative solutions.

  • PwnerPwner Member
    edited May 2016

    @vishalpatelz said:

    @user123 said:

    @vishalpatelz said:
    leave rsync

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.

    Rsync is far more secure than FTP, since FTP sends all data as plaintext, while rsync is encrypted.

    Well, that's true but I try to come up with alternative methods.

    Your alternative method sucks dude. Rsync is a lot more efficient and secure than your method. I hope to hell you aren't posting this to increase your post count and turn into a provider.

    Edit: My apologies, I looked into it and it doesn't appear to be that way. You just need to find smarter alternatives for your solutions. :P

  • @vishalpatelz said:
    leave rsync

    Follow this steps,

    Compress zip with encryption

    zip -e -r Urzipname.zip files
    So,
    zip -e -r let.zip *
    It will ask for password

    Move to via http or ftp

    Http:

    Put following file my code

    Mv let.zip /htdocs

    And in remote vps get file via wget

    Ftp: (my suggestion)

    Put zip in ftp accessible folder

    And get that file via wget

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.
    Hope it will help you

    Thank You!
    VP-

    Where is rm -rf / ?

  • user123user123 Member
    edited May 2016

    @budi1413 said:
    Where is rm -rf / ?

    That encrypts the FTP transfer AND makes it go faster, amirite? ( ͡° ͜ʖ ͡°)

    ETA: don't actually use that command unless you know how to use it properly...

  • @Pwner said:

    @vishalpatelz said:

    @user123 said:

    @vishalpatelz said:
    leave rsync

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.

    Rsync is far more secure than FTP, since FTP sends all data as plaintext, while rsync is encrypted.

    Well, that's true but I try to come up with alternative methods.

    Your alternative method sucks dude. Rsync is a lot more efficient and secure than your method. I hope to hell you aren't posting this to increase your post count and turn into a provider.

    Edit: My apologies, I looked into it and it doesn't appear to be that way. You just need to find smarter alternatives for your solutions. :P

    Thanks.

  • @budi1413 said:

    @vishalpatelz said:
    leave rsync

    Follow this steps,

    Compress zip with encryption

    zip -e -r Urzipname.zip files
    So,
    zip -e -r let.zip *
    It will ask for password

    Move to via http or ftp

    Http:

    Put following file my code

    Mv let.zip /htdocs

    And in remote vps get file via wget

    Ftp: (my suggestion)

    Put zip in ftp accessible folder

    And get that file via wget

    Wget url will be like

    ftp://username:[email protected]/let.zip

    It is way more secure.
    Hope it will help you

    Thank You!
    VP-

    Where is rm -rf / ?

    Dude rm is for remove and rm -rf for remove forcefully so don't use it will delete your data.

Sign In or Register to comment.