What are the risks when updating my Ubuntu server?
My server has been running for about a month and there are 29 updates available and 1 security update. I'm using a (dokku) container to run a webapp with the server, the container is nginx, postgres, django.
What are the risks involved when updating Ubuntu? I have been doing my development on a windows computers using containers. Is it best practice to run my development also on ubuntu? If my development platform is local, then it would be different from my production environment anyways. I guess another strategy would be to run a second vps on Linode and use it for pre-deployment checking?
✓ Best Answer
I'm afraid that I've already done this. It never dawned on me, this is my first time deploying a website/app on a VPS.
Well, any backup you restore to your Linode will overwrite it. I don't know if you can restore a backup to block storage (my guess would be not but I don't know…maybe file a support ticket to ask). My suggestion would be to:
- Take a census of the packages you actually need.
- Spin up a new Linode.
- Allocate half the available disc space to it (the other half will be un-allocated (don't forget to include swap in this total…so half must include both swap and /dev/sda). Install only the packages from step 1.
- Re-deploy your app on the new Linode.
- Test. Test. Test.
- Switch your domain name to the new Linode's IP addresses (warning: there will be some propagation time here).
- Spin down/destroy the old Linode.
It is possible to reclaim unused-but-allocated disc space back to free but it's tricky. I'd consult with support before attempting this.
P.S. You could maybe restore a backup to a disc that's half the size. You'll have to check with support.
Worst case: The risks involve the possibility of something going wrong and the server becomes totally unresponsive, you can’t solve the issue and the only recourse you have is to restore from backup.
You do regularly backup your server don’t you?
Speaking of backups, make sure your backup can actually restore your server as well.
I do have backups but I have not tested a restore. To test the restore, would I temporarily purchase a new linode and restore a backup there?
You can add the backup service to your existing Linode, setup your own system, or both.
PROVIDED your Linode has enough free disc space to hold the restored backup. If you allocated ALL your disc space to your Linode, you'll have to de-allocate some of it (DANGER WILL ROBINSON! DANGER! DANGER!) to make room.
The moral of this story is:
Don't allocate all your free disc space to your Linode.