rync files between servers with bandwidth throttling

As part of moving from one hosting provider to another, I needed to move a large amount of uploaded files to my local machine and then out to a VM on a new provider. Looking at rsync to do this, for moving the content locally first I didn’t want to eat up all my home bandwidth, so found there is a ‘bwlimit’ parameter in KB, e.g. –bwlimit=500 would limit to 500kbps:

rsync --bwlimit=[bw here in kbps] -a --progress [id]@[host]:/source/path .

Run this from the folder where you want the files to arrive what also contains folder ‘path’ (otherwise you’ll end up with path/path/[files here])

ssh into Hetzner VMs with an ssh key

During VM creation, assuming you added an ssh public key value when prompted:

Add an entry like the following to your ~/.ssh/config:

Host ip-of-your-new-vm
PreferredAuthentications publickey
IdentityFile ~/.ssh/name-of-your-private-key

ssh into your VM with:

ssh root@ip-of-your-new-vm

AWS Lightsail default ssh userid

To ssh into AWS ec2 instances the default user id is usually ‘ec2-user’ (see my ec2 ssh checklist here).

Lightsail vps instances appear to use different default userids, depending on the OS. For example, for an Ubuntu Lightsail instance the default ssh userid is ‘ubuntu’:

ssh -i path-to-your-ssh-pen-file ubuntu@your-instance-ip

SSL certs upgraded, Docker images upgraded, ready to go!

I had to renew my SSL certs for this site, so while doing so I upgraded and addressed a few other issues.

First, apparently when I deployed the SSL certs last time I missed out some of the root certs in the chain. The vendor I used gives you each of the root certs individually and you need to manually concatenate them together yourself. More in another post on the steps I too to do this.

Since certs are part of my nginx Docker image, I rebuilt my image upgrading everything to latest versions. Since it was a also a couple of years since I last did this, I also had to go back through my posts here to work out the steps I took to deploy last time. I’ll post another update on the steps I took for this also later.