Check Your Backups!

If you are reading this, check your backups right now. Is it a pain? Will it be a bigger pain if you lose all your data? Check your backups!

(In a twist of delicious irony, Hello World #2 is also going to be about backups…)

If you’re looking for a Hello World #1, it doesn’t exist any more – I was lamenting the downfall of social media and the need to have a personal website for self-expression, and started this website with the hope that I would no longer need to introduce myself as often. Perhaps in a twist of delicious irony, I am introducing myself again less than 24 hours after I first wrote about it.

The Problem: When I started Ghost and initialized the MySQL database, I did not disable automatic updates from Watchtower, a container monitor, nor did I check to see that the volume that I mounted in Docker was the correct path. As the container was ran, data was saved and a directory was created and aliased to the container, but the data was not persisted across versions of MySQL. Consequently, this blog’s data was lost upon updating.

The Fix: MySQL has been pinned to a stable version rather than the latest version, and the typo in the volume mount has been fixed. I modified the DB and then restarted it several times to make sure changes persisted.

Moving Forward: Test the data – writing test data and then checking if the backup is updated to reflect the change would have been a quick and dirty way to see that I did not save any relevant data and would have alerted me to the fact.


Posted

in

by

Tags: