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

One thing to note here, if you're syncing over a database (like MySQL or PostgreSQL) please shut down the service before syncing or using the proper backup and restore tools. If you need some good backup scripts for mysql or pgsql I've written some here: https://github.com/digitalsparky/mysql-tools and https://github.com/digitalsparky/pgsql-tools :).
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.
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 ?
moving VPS is pain in the ass.
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.
How would I do it if it is a Windows VPS?
Hello sir, can you help me move my VPS
Can't you use a control panel to migrate from one VPS host to another? For example, FastPanel?
Used this a couple of times, and again yesterday. Thanks for this, Chris!
real suggestion you should make video about how to make your own vps at home
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!
Are you rsync'ing from root to root?
Can you do tuts sir how adobe product run in linux mint? Or window apps use in linux?
Still waiting on COOKING WITH CHRIS
grab the camera, some meat, some adult beverages, and fire up the grill for a Stream
How well does your Minecraft server run?
Thank you, Chris. Saved for reference.
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.
Timestamps:
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
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 !
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?
I was thinking to do it, that's so helpful, thank you so much
Hi Chris. Would you teach us how to use the OpenZFS on Linux?
Hey Chris can you tell, from which country you got most of views? Plz tell top 3.
This culd f* up the mounting configuration.
So I would (for safety measures) look if the configuration is valid after the transfer.
Hi chris sorry to disturb . please help me with windows 10 minimal iso . thanks
Great stuff, thanks Chris
Does this mean i could also transfer my providers vps to my local host VM ?
4:30 xD
Shout out for the time stamps in the comment section