You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/utils/backup_db.sh

11 lines
210 B

#!/bin/bash
#
backup_dir='../data/backup/'
if [ ! -d $backup_dir ];then
mkdir $backup_dir
fi
mysqldump -uroot -h127.0.0.1 -p jumpserver -P3307 > ${backup_dir}/jumpserver_$(date +'%Y-%m-%d_%H:%M:%S').sql