/[smeserver]/rpms/smeserver-mysql/sme10/smeserver-mysql-2.7.0-bz12145-backupuserprivileges.patch
ViewVC logotype

Diff of /rpms/smeserver-mysql/sme10/smeserver-mysql-2.7.0-bz12145-backupuserprivileges.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by jpp, Thu Sep 5 14:04:25 2024 UTC Revision 1.3 by jpp, Thu Sep 5 14:09:40 2024 UTC
# Line 6  diff -Nur --no-dereference smeserver-mys Line 6  diff -Nur --no-dereference smeserver-mys
6       fi       fi
7       message="$message \nThere was an error trying to dump database $db, please check for table errors in this db. Forcing a backup of the corrupted DB."       message="$message \nThere was an error trying to dump database $db, please check for table errors in this db. Forcing a backup of the corrupted DB."
8  -    mysqldump --force --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2  -    mysqldump --force --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2
9  +    mysqldump --force --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2  +    mysqldump --force --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2
10       if [ "$fixtables" = "enabled" ]; then       if [ "$fixtables" = "enabled" ]; then
11          repair="failure"          repair="failure"
12          message="$message \nTrying to auto-repair the db and do a backup after..."          message="$message \nTrying to auto-repair the db and do a backup after..."
13          mysqlcheck -s --auto-repair -c "$db"  &&  \          mysqlcheck -s --auto-repair -c "$db"  &&  \
14  -       mysqldump --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump && repair="success"  -       mysqldump --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump && repair="success"
15  +       mysqldump --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump && repair="success"  +       mysqldump --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump && repair="success"
16          message="$message \n => $repair"          message="$message \n => $repair"
17       fi       fi
18       echo $message       echo $message
# Line 30  diff -Nur --no-dereference smeserver-mys Line 30  diff -Nur --no-dereference smeserver-mys
30   for db in $(mysql -BNre "show databases;"|egrep -vi "^information_schema$|^performance_schema$")   for db in $(mysql -BNre "show databases;"|egrep -vi "^information_schema$|^performance_schema$")
31   do   do
32  -    mysqldump --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || onfailure $db  -    mysqldump --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || onfailure $db
33  +    mysqldump --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || onfailure $db  +    mysqldump --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || onfailure $db
34  +done  +done
35  +  +
36  +# Backup the users and privileges  +# Backup the users and privileges
# Line 66  diff -Nur --no-dereference smeserver-mys Line 66  diff -Nur --no-dereference smeserver-mys
66       fi       fi
67       message="$message \nThere was an error trying to dump database $db, please check for table errors in this db. Forcing a backup of the corrupted DB."       message="$message \nThere was an error trying to dump database $db, please check for table errors in this db. Forcing a backup of the corrupted DB."
68  -    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --force --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2  -    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --force --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2
69  +    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --force --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2  +    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --force --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db"-failed.dump || message="$message \nFailed to force backup of corrupted db $db as $db-failed.dump" >&2
70       if [ "$fixtables" = "enabled" ]; then       if [ "$fixtables" = "enabled" ]; then
71          repair="failure"          repair="failure"
72          message="$message \nTrying to auto-repair the db and do a backup after..."          message="$message \nTrying to auto-repair the db and do a backup after..."
73          /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqlcheck --socket=!!!SOCKET!!! -s --auto-repair -c "$db"  &&  \          /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqlcheck --socket=!!!SOCKET!!! -s --auto-repair -c "$db"  &&  \
74  -       /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump && repair="success"  -       /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump && repair="success"
75  +       /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump && repair="success"  +       /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump && repair="success"
76          message="$message \n => $repair"          message="$message \n => $repair"
77       fi       fi
78       echo $message       echo $message
# Line 90  diff -Nur --no-dereference smeserver-mys Line 90  diff -Nur --no-dereference smeserver-mys
90   for db in $(/opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysql --socket=!!!SOCKET!!! -BNre "show databases;"|egrep -vi "^information_schema$|^performance_schema$")   for db in $(/opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysql --socket=!!!SOCKET!!! -BNre "show databases;"|egrep -vi "^information_schema$|^performance_schema$")
91   do   do
92  -    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump || onfailure $db  -    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump || onfailure $db
93  +    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --ignore-table=mysql.users --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump || onfailure $db  +    /opt/rh/rh-mariadb!!!VER!!!/root/usr/bin/mysqldump --socket=!!!SOCKET!!! --ignore-table=mysql.event --ignore-table=mysql.user --single-transaction --add-drop-table -QB "$db" -r /home/e-smith/db/mariadb!!!VER!!!/"$db".dump || onfailure $db
94  +done  +done
95  +  +
96  +# Backup the users and privileges  +# Backup the users and privileges


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed