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