1764466945_maxresdefault.jpg

How to Move VPS Servers
In this video, I go over how to migrate servers in the cloud from one provider to another. This allows you to easily move between major providers and avoid vendor lock-in. This method works with ANY provider as we will be utilizing rsync with a lot of options.
Try out Upcloud (Free $25 Dollar Credit) – http://bit.ly/upcloud-ctt

00:00 Introduction
01:02 Setup New Server
03:47 SSH Firewall Setup
04:45 Initial SSH Connection to New Server
06:09 Sync from Old Server – Rsync Setup
08:40 Post-Sync
10:35 Conclusion

Commands Used:
rsync -auHxvz –numeric-ids –exclude=/etc/fstab –exclude=/etc/network/* –exclude=/proc/* –exclude=/tmp/* –exclude=/sys/* –exclude=/dev/* –exclude=/mnt/* –exclude=/boot/* –exclude=/root/* -e “ssh -i ~/.ssh/minecraft” –progress ro**@******************us.com:/* /

a – Archive preserve file properties
u – update only if newer
H – preserve hard links
x – don’t cross filesystem boundries
v – verbose
z – compress
e – use a certain shell for connection .

►► Digital Downloads ➜ https://www.cttstore.com
►► Patreon ➜ https://www.patreon.com/christitustech
►► Twitch ➜ https://www.twitch.tv/christitustech
►► Website and Guides ➜ https://christitus.com

source

29 thoughts on “How to Move VPS Servers

  1. i want to move it with dd or snapshot. do you have a tutorial related to that? i'm afraid of network setting. i have ubuntu 22 running having a control panel for website that doesn't support rsync.

  2. Thanks, my provider is discontinuing vps I use, already rebuilt it this year and don't have time to redo again.

    This doesn't look at all foolproof though – people should understand what they are doing already and take this as a starting point only. After watching your video, I began to inspect my tiny inconsequential personal VPS and almost immediately discovered there is an openvpn script in /etc/network/if-up.d/* that wouldn't be copied over using your –exclude list. People must check & customise their –excludes carefully. I imagine many people will have files in /root/* they want copied as well.

    Lastly – I think /run should be added to the list of excludes along with /proc /sys /dev ?

  3. DON'T USE THE "-u" PART!! (copy only if newer), if you are migrating to a newly created VPS it won't copy a loooot of files.
    I would also add "–delete-after", so, extra files that are in the new VPS and were not in the old VPS are deleted afterwards.

  4. Hi Chris, thanks for a very useful video. How did you solve the copied ssh credentials problem (permission denied)? Should I exclude ssh creds from the rsync command and if yes, how to? Thanks again!

  5. Can you make a PXE howto video? Basically I want to use my NAS to boot linux isos I just copy into a certain folder. So I don't need to look for usb sticks to boot any iso I encounter.
    I got this far: I set up my router to deliver the IP of my NAS as BOOTP, by setting the dhcp config 66 and 67. So the booting client sees the IP of my NAS and gets the pxelinux.0 file as it should. But after loading that file it fails silently and tries booting via IPv6. I'm expecting to see the menu I configured in pxelinux.cfg/default but it somehow doesn't do that and it doesn't tell me what I did wrong. Maybe you have experience with that? I never even deployed WDS myself, so I'm a complete noob in this regard.

  6. Awesome, I was looking how I could move my VPS to a bigger one and I've only stumbled across backing everything as tar.gz and I totally forgot that I can do this with rsync. Thanks a lot !

  7. Hello Chris, I had a question regarding btrfs and timeshift which I wanted to get help with on your discord but it seems the invite link in the video description is expired. Is this an issue on my side I should worry about?

Comments are closed.