Tags: patch Christian and Thomas (zigo),
Apologies if I have omitted any important context in the quotes below ... CH> I wonder why the mysql database is explicitly excluded from the backup? CH> To me user permissions and ACLs are the most important things? I also wondered. I agree. TG> # List of DBBNAMES for Monthly Backups. TG> MDBNAMES="mysql $DBNAMES" TG> This is why I removed it with a grep. AutoMySQLBackup 2.5.1 fixed this: MDBNAMES="${DBNAMES}" TG> You don't need to do TG> anything, and the mysql grant tables WILL be included in the backup. Yes, but only in the *Monthly* backups. The problem is that, by default, they will not be in the Daily or Weekly backups. README.Debian says: > automysqlbackup creates backup every day, week and month for all of > your MySQL database, to a configured folder. There's nothing to do but > to install this package, and you'll rest assured that you have a way to > go back in the history of your database. This is not true for the current defaults. TG> As per the rest of the text in this issue, there is no fix needed. Please reconsider. Tested patch below, which is essentially: DBNAMES=all MDBNAMES="$DBNAMES" DBEXCLUDE="information_schema performance_schema" Thank you! Daniel Lewart Urbana, Illinois --- debian/defaults.orig 2021-08-30 09:51:22.000000000 -0500 +++ debian/defaults 2021-10-06 00:00:00.000000000 -0500 @@ -22,7 +22,8 @@ # reading the mysql folder content. Feel free to replace by something else. # DBNAMES=`find /var/lib/mysql -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f5 | grep -v ^mysql\$ | tr \\\r\\\n ,\ ` # This one does a list of dbs using a MySQL statement. -DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\r\\\n ,\ ` +# DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\r\\\n ,\ ` +DBNAMES=all # Backup directory location e.g /backups # Folders inside this one will be created (daily, weekly, etc.), and the @@ -49,11 +50,12 @@ # === ADVANCED OPTIONS ( Read the doc's below for details )=== #============================================================= -# List of DBBNAMES for Monthly Backups. -MDBNAMES="mysql $DBNAMES" +# List of DBNAMES for Monthly Backups. +# MDBNAMES="mysql $DBNAMES" +MDBNAMES="$DBNAMES" -# List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes) -DBEXCLUDE="" +# List of DBNAMES to EXCLUDE if DBNAMES are set to all (must be in " quotes) +DBEXCLUDE="information_schema performance_schema" # Include CREATE DATABASE in backup? CREATE_DATABASE=yes