Howdy, Stranger!

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


Best method to transfer VPS between server
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.

Best method to transfer VPS between server

Hi,

I have 1 VPS on Server A and want to transfer to Server B. What is most efficient and faster way to transfer it over coming weekend.

I'm been think about rsync over now and by the weekend, just do a rsync differences. It will be efficient and fast, right?

That's my theory and technically how to do that and I have no idea?

Can anybody help?

Thanked by 1DewlanceVPS

Comments

  • What virt type is the VPS?

  • It depends. As quadhost said, what is the virtualization type? Do you have admin rights to virtualization?

    What do you host in server A?
    If it is just websites with a web panel, create a new webpanel to server B with the same infrastructure and move files using rsync. Dump databases and restore them to the new server. Check ownership of the files to the new server, according to the new settings.

  • If you can't take snapshots/images/or a vzdump, I'd say to stick with rsyncing the server over.

  • @quadhost said:
    What virt type is the VPS?

    both is running KVM and I do have root access for the server & node

  • @doghouch said:
    If you can't take snapshots/images/or a vzdump, I'd say to stick with rsyncing the server over.

    it takes too long to backup - gzip - transfer - restore

  • RIYADRIYAD Member, Patron Provider

    You can use this

    To copy a file from B to A while logged into A:

    scp username@b:/original-file /destination

  • IkoulaIkoula Member, Host Rep

    Are servers A and B in the same DC ?

  • Nobody here can properly answer because nobody here knows all that you've done to set up the first server. One solution is to use configuration management tools and just create the second server to be a clone of the first. A second solution is to realize that now would be a great time to test out whether or not your backup procedure is useful.

    Thanked by 1PepeSilvia
  • @impossiblystupid said:
    A second solution is to realize that now would be a great time to test out whether or not your backup procedure is useful.

    This.

  • @gethosted said:
    Hi,

    I have 1 VPS on Server A and want to transfer to Server B. What is most efficient and faster way to transfer it over coming weekend.

    I'm been think about rsync over now and by the weekend, just do a rsync differences. It will be efficient and fast, right?

    That's my theory and technically how to do that and I have no idea?

    Can anybody help?

    https://lowendtalk.com/discussion/26780/how-to-easy-move-kvm-servers-to-different-providers/p1

  • I always using rsync. Never failed me.

  • gethostedgethosted Member
    edited December 2016

    @Ikoula said:
    Are servers A and B in the same DC ?

    >

    yes

    @impossiblystupid said:
    Nobody here can properly answer because nobody here knows all that you've done to set up the first server. One solution is to use configuration management tools and just create the second server to be a clone of the first. A second solution is to realize that now would be a great time to test out whether or not your backup procedure is useful.

    actually i do have r1soft backup on the VPS, i have try to restoring and it failed. Once restore and reboot it goto grub minimal bash line editing. i already asking for help from my r1soft reseller. that is another thread for another time.

    using management tools is my last choice. is time consuming but it work.

    Thanks! I have a look at it.

  • @WiryawanAdipa said:
    I always using rsync. Never failed me.

    Do you mind to share how you do it?

  • WiryawanAdipaWiryawanAdipa Member
    edited December 2016

    @gethosted said:

    @WiryawanAdipa said:
    I always using rsync. Never failed me.

    Do you mind to share how you do it?

    rsync[space]-avz[space]root@[your old server IP]:[folder path]*[space].

    [space] = space on your keyboard, just in case you don't know it.

    rsync -avz [email protected]:/home/admin/web/domain.com/public_html/* .

    and you have to do this on your new server and at the destination folder (obviously)

  • Depending on things, you may want to add -AX to the rsync options.

    Also, if you're only copying one user's files, make sure to run the command as that user across both machines. This will keep perms/uid/gid etc. the same for that user without complications.

    If you're copying system files or backing up a whole VPS/Machine, use root but include the --numeric-ids options to keep ids in sync. Also, exclude /proc, /sys, (maybe) /tmp, /dev based on your specific setup/needs.

    An even better/finer grained approach is to rsync system1 to a folder on system2 (to "recreate/restore" system1 on system2) like:

    (run as root on system1)

    rsync -avzHSAXP --numeric-ids / root@system2:/some-tmp-backup-folder/system1/

    Login on system2 as root

    rsync -avzHSAXP --numeric-ids /some-tmp-backup-folder/system1/etc/ /etc/ --delete
    rsync -avzHSAXP --numeric-ids /some-tmp-backup-folder/system1/root/ /root/ --delete
    rsync -avzHSAXP --numeric-ids /some-tmp-backup-folder/system1/ / --delete --exclude /proc --exclude /sys ...
    

    (... = add other excludes)

    Of course at the end of this, you have to adjust the network configuration and fstab on system2 as it has been clobbered from system1. Depending on whether you have grub or not (KVM vs OpenVZ) you should rerun the grub installer if hadn't been run before. Also, run the grub-update again to keep things updated.

    Pretty much everything else should be the same as desired.

    Tune the above to suit your needs/specifics. You can also add excludes for fstab and network config files (and/or others).

    HTH.

  • Hire a clairvoyant.

  • IkoulaIkoula Member, Host Rep

    @gethosted can't you ask your host to move the vdisk from A server to B server ?

  • @Ikoula said:
    can't you ask your host to move the vdisk from A server to B server ?

    how can I do that? any pointer for further reading?

  • IkoulaIkoula Member, Host Rep

    Just ask your host's support team if they can do that for you.

  • Going from KVM to openVZ the only possibility would be copying over /home/user and any other wanted configs as well as dpkg --list ?

  • @Nihim said:
    Going from KVM to openVZ the only possibility would be copying over /home/user and any other wanted configs as well as dpkg --list ?

    It's just KVM to KVM.

  • Do you own the host nodes?

  • DewlanceVPSDewlanceVPS Member, Patron Provider

    For SolusVM KVM you can use their transfer tool, For Manual transfer you can read their migration tutorial.




    Manual method: First I compress file, Move it to Node B using rsync or any other method and restore it on Node B. Change IP and reboot(Only If DC is different).

  • @elgs said:
    Do you own the host nodes?

    Yes

    @DewlanceVPS said:
    For SolusVM KVM you can use their transfer tool, For Manual transfer you can read their migration tutorial.




    Manual method: First I compress file, Move it to Node B using rsync or any other method and restore it on Node B. Change IP and reboot(Only If DC is different).

    I'm using Virtualizor.

  • @daily you mind expanding on that a bit. You mean kvm to kvm methods would work for kvm -> openvz?

    without host access

  • if you own the nodes, then, you have administration privileges (I suppose). If so, use virtualizor migration tool. http://www.virtualizor.com/blog/?p=449

  • @jvnadr said:
    if you own the nodes, then, you have administration privileges (I suppose). If so, use virtualizor migration tool. http://www.virtualizor.com/blog/?p=449

    Thanks. I get in touch for support for the details steps and procedure

  • @Nihim said:
    @daily you mind expanding on that a bit. You mean kvm to kvm methods would work for kvm -> openvz?

    without host access

    I was just saying the OP mentioned hes trying to move a VPS from a KVM to another KVM node.

  • @gethosted said:

    @elgs said:
    Do you own the host nodes?

    Yes
    I'm using Virtualizor.

    For OpenVZ, use either vzmigrate or

    source:

    vzdump -compress gzip -remove -mode suspend -maxfiles 1 -dumpdir /root/dump 142
    

    destination:

    vzrestore vzdump-openvz-142-2016\_02\_24-21\_24\_54.tar.gz 100
    

    If you have any firewall settings, don't forget to copy the firewall fires.

    For KVM, copy the qcow2 file and the config file.

Sign In or Register to comment.