Skip to content

Commit 29c7bb5

Browse files
committed
🚧 kafka
1 parent e018b0b commit 29c7bb5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

favorite-file/shell/mysql_backup.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
4+
backupDatetime=$1
5+
6+
if [ "$backupDatetime" = "" ];
7+
then
8+
echo -e "\033[0;31m 请输入备份日期 \033[0m"
9+
exit 1
10+
fi
11+
12+
echo "备份日期 = $backupDatetime"
13+
14+
/usr/bin/mysqldump -u root --password=adg123adg456adg wordpress > /opt/wordpress-"$backupDatetime".sql
15+
16+
17+

0 commit comments

Comments
 (0)