I have a website up and running on a VPS instance from Vultr running Ubuntu 18.04LTS, everything is fine. I wanted to try out a snapshot of the instance in a restore session just in case something bad happened to the system. So I created a new instance and deployed that snapshot as expected, but I couldn't view my website and got
error establishing a database connection after changing the DNS to the new IP address.
So the restore session failed in this case and didn't achieve its goal. I contacted the support team but they only pointed out that I must correct some network configuration on the new instance after the snapshot restore, but no specific instructions as to how to do that on Ubuntu 18.04LTS.
I consulted their documentation, but it didn't mention something about the new network setup of
ifupdown in Ubuntu 180.04LTS servers.
Let me go point-to-point in the documentation, I noticed the following:
- on my new instance the
/etc/udev/rules.d/70-persistent-net.rulesfile is empty, nothing in there.
- when I reviewed the contents of
/etc/network/interfacesthere was no IP addresses inside, instead I have this commented out message.
# ifupdown has been replaced by netplan(5) on this system. See # /etc/netplan for current configuration. # To re-enable ifupdown on this system, you can run: # sudo apt install ifupdown
So I reviewed
/etc/netplan setup and there I have two files:
01-netcfg.yaml, and it is empty.
The other one
10-ens3.yaml file has this setup inside:
network: version:2 renderer: networkd ethernets: ens3: dhcp4: yes
So given that, I am totally lost with this setup. I feel it is irrelevant to the new
netplan system. So I would be very grateful if you could help me with the right networking configuration in this case scenario to have my live website restored.