jumpserver/utils/backup_db.sh

11 lines
210 B
Bash
Raw Normal View History

2018-08-16 09:08:45 +00:00
#!/bin/bash
#
backup_dir='../data/backup/'
if [ ! -d $backup_dir ];then
mkdir $backup_dir
fi
2019-04-30 02:20:48 +00:00
mysqldump -uroot -h127.0.0.1 -p jumpserver -P3307 > ${backup_dir}/jumpserver_$(date +'%Y-%m-%d_%H:%M:%S').sql