79247744

Date: 2024-12-03 13:18:46
Score: 0.5
Natty:
Report link

Update by Docker image version

It didn't work

I updated the Docker images like this:

Commit

But, the website threw the 500 error:

500 error

Bad restore

I had taken backups of Docker named volumes by this approach: https://stackoverflow.com/a/79247304/3405291

So, I did restore the Docker named volumes. However, the website threw this error:

Error establishing a database connection

Database error

Fix restore

The database connection error got fixed. To do so, I deleted everything inside the database volume by rm -rf * command:

/var/lib/docker/volumes/wordpress_dbdata/_data/

Then I restored the Docker volume of the database.

This screenshot shows the contents of the database volume before deleting/restoring and after:

Database volume: before & after

As can be seen, before deleting everything, there were some extra files. Probably those files were messing around with the database connection.

Implication

The update by modifying the version of Docker images didn't work. But backup/restore helped us.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Megidd