Browse Source

Merge pull request #1702 from jumpserver/dev

Dev
pull/2638/head
老广 6 years ago committed by GitHub
parent
commit
5470ab752e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/assets/utils.py
  2. 10
      utils/backup_db.sh

2
apps/assets/utils.py

@ -13,7 +13,7 @@ def get_assets_by_id_list(id_list):
def get_assets_by_fullname_list(hostname_list):
return Asset.objects.get_queryset_by_fullname_list(hostname_list)
return Asset.get_queryset_by_fullname_list(hostname_list)
def get_system_user_by_name(name):

10
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
Loading…
Cancel
Save