initial commit of file from CVS for smeserver-affa on Tue 10 Sep 11:19:50 BST 2024
This commit is contained in:
10
root/etc/affa/scripts/mysql-dump-tables
Executable file
10
root/etc/affa/scripts/mysql-dump-tables
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /tmp/MySQL-Dumps
|
||||
chmod 700 /tmp/MySQL-Dumps
|
||||
for db in $(mysql -BNre "show databases;")
|
||||
do
|
||||
mysqldump --add-drop-table --single-transaction -QB "$db" -r /tmp/MySQL-Dumps/"$db".dump || exit 1
|
||||
chmod 400 /tmp/MySQL-Dumps/"$db".dump
|
||||
done
|
||||
exit 0
|
Reference in New Issue
Block a user