Blog backup procedure is failing

I used to be able to make an SQL dump of my block, for backup, as follows:

Dump the blog state to a timestamped backup

mysql will prompt for a password

bakfile=blog-date --utc +%Y-%m-%dZ%H:%M:%S.sql.bzip
mysqldump --add-drop-table -h mysql2.ibiblio.org -u esrblog -p esrb2 | bzip2 -c >$bakfile

This no longer works, apparently because msqldump is not on my $PATH.

Can that be fixed? If I have misunderstood the problem, what is the preferred way to make backups?

I’ve added a file as you on login.ibiblio
~/.enable_scls
which you can source either at a shell or by adding it to your ~/.bashrc or ~/.bash_profile, whichever you can confirm you want and gets loaded at login. I stopped short of adding that for you.

When you source that file, you get a newer-than-default PHP, and you get the various mysql tools in your path, including mysqldump. Here’s what that looks like for me:

[cmpalmer@login2 ~]$ grep enable ~/.bashrc
. ~/.enable_scls
[cmpalmer@login2 ~]$ cat .enable_scls
  source scl_source enable rh-php73
  source scl_source enable rh-mariadb101
[cmpalmer@login2 ~]$ which mysqldump
/opt/rh/rh-mariadb101/root/usr/bin/mysqldump

Unfortunately the emergency replacement of the login host means we haven’t gotten to the point of deploying a default mysql using scl for everyone yet. That’s in the queue. That problem aside, the documented backup strategy is fine for now.