This isn’t really a question, I guess, as I think I can recover things, but perhaps it’s a cautionary tale, and maybe someone has some insight to offer.
I recently upgraded a droplet from Ubuntu 20.04 to 22.04. One of the last steps of do-release-upgrade
is to remove outdated packages, but it warns that could take hours, so I deferred that until after the machine was back up and running. Everything seemed fine, so I went about removing old packages. Based on advice found online, I also removed config files for everything marked RC
in dpkg -l
. That was a mistake, as one of the packages was nginx, and that wiped out my /etc/nginx
directory, as well as /var/log/nginx
, and perhaps others.
It was extremely puzzling, because the server was still running just fine. I realized it only reads the config when it starts up and doesn’t need it again.
Now, there’s still an nginx installed, as shown by dpkg -l
, so I don’t know why the dpkg --purge
removed the config files. I consider this a bug.
Fortunately, I did a snapshot just before the upgrade, and I’m instantiating a new droplet from it, hoping to copy over the nginx config.
It’s too bad one can’t mount a snapshot as a filesystem on an existing droplet. I think that would be a very useful feature.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey @jetforme,
Great idea, sounds like it’d be super useful!
The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.
Hope that helps! - KFSys.