[MySQL] Simplified mysql command
This commit is contained in:
parent
02d2ec5b9c
commit
86b074751c
@ -9,7 +9,7 @@ retention=3
|
|||||||
mkdir -p $backup_dir
|
mkdir -p $backup_dir
|
||||||
|
|
||||||
# database backup
|
# database backup
|
||||||
for DB in $(mysql -e 'show databases' -s --skip-column-names|grep -v 'information_schema\|performance_schema'); do
|
for DB in $(mysql -e 'show databases' -sN|grep -v 'information_schema\|performance_schema'); do
|
||||||
mysqldump $DB > "$backup_dir/$date.$DB.sql";
|
mysqldump $DB > "$backup_dir/$date.$DB.sql";
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user