From 14b1e3fa1367d966fcc7a05caa3a8117f13f088e Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 16 Aug 2018 17:08:45 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B7=BB=E5=8A=A0backup=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/backup_db.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 utils/backup_db.sh diff --git a/utils/backup_db.sh b/utils/backup_db.sh new file mode 100755 index 000000000..21ed938a8 --- /dev/null +++ b/utils/backup_db.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# + +backup_dir='../data/backup/' + +if [ ! -d $backup_dir ];then + mkdir $backup_dir +fi + +mysqldump -uroot -h127.0.0.1 -p jumpserver > ${backup_dir}/jumpserver_$(date +'%Y-%m-%d_%H:%M:%S').sql