The Hazards of Downgrading Your Digital Ocean Droplet
Posted in Coding Time
I’ve been a super fan of Digital Ocean, but enthusiasm has faded after downgrading one of my droplets. The whole point of cloud hosting like Digital Ocean is to easily ramp up and down depending on your server needs. When a company makes it easy to ramp up and difficult to revert back down, the consumer enthusiasm will erode. I followed this guideline to downgrade my server but ran into some issues that I’m going to outline here.
1. If you’ve removed root login for security issues (which you should), then you’ll need to reinstate those privileges if you are getting permission denied errors. I suspect the permissions issue running the rsync was caused by the iredmail server setup.
To add root login again open /etc/ssh/sshd_config and change PermitRootLogin yes. Afterward, change it back to no.
2. My server was running Ubuntu 12.04. Since I allow SSH access on a non standard port, I needed to clarify this port on my copy port command:
I also needed to adjust the rsync command as well:
3. After rsync finishes I was not able to log into the server because the SSH RSA key fingerprint didn’t match what was on my local machine. This makes sense because it’s using a different fingerprint from the bigger droplet but the ID on my machine is pointing to the wrong IP address.
To fix this go to your user folder, enable hidden files, open .ssh and open known_hosts (on a mac). Copy the key from your past server (the one with the IP address of the bigger droplet), then past it at the end of the file. Replace the old IP address with the new IP address. You’ll be able to SSH into the smaller server now.
4. Most of the services were not working after rsync completed so I did a system reboot but was no longer able to connect to the server nor login with SSH. After many Google searches I found the needed fix. First, use the Digital Ocean dashboard console to log into the server. After it sets up the server it will display itself as the name of your old server. (Note: I was able to set a password to the site by asking Digital ocean to put the server in Recovery Mode and then accessing the console. From there I was able to change the root password. You might want to try resetting the root password first through the normal dashboard setting options in Digital Ocean).
I ended up fixing this problem by completely the following file with this command. Commenting out the new lines within the file didn’t work for me, so ended up deleting it completely.
And voila (after two days)! I was paying less money for a server. Now compare this with the steps needed to upgrade your server: create a snapshot, create a bigger droplet, change the network IP’s. Crazy.