Published: Sunday, Oct 27, 2013 Last modified: Monday, Apr 8, 2024

So, I have unenviable task of moving a VPS from Bitfolk to Linode.

Both run Debian 7 (wheezy).

So the general practice I find is to rebuild from scratch. Argh, doing it by hand takes a long time.

Doing it with Configuration Management would be quicker, if you bothered to spend even MORE TIME developing the recipes to setup the machine. Nevermind the crap load of code that goes into running Puppet or Ansible and their crazy crazy dependencies.

Configuration management for user accounts sounds quite tricky

Previously I’ve something like [[|e/13036]], a short ~20 line shell script.

Followed up for disabling password authentication / only allowing key based authentication with PasswordAuthentication No in /etc/ssh/sshd_config.

I recommend maintaining a list of your users ssh public keys online to make things easier, e.g.

Doing this in any CM tool seems absolutely non-trivial!!

Enter rsync

In an ideal world I could just rsync everything as root. But as this resource points out, there are loads of traps. Many mount points that shouldn’t be copied over. Network configurations and perhaps VPS specific settings that cannot be overwritten.

root@li524-199:~# cat exclude.txt
root@li524-199:~# cat
rsync -aPzx --exclude-from=/root/exclude.txt /