• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    a10 config backup for aXAPI
    #!/bin/bash 
    ################################################# 
    # 
    #   script by Vincent yu 
    #   created at 20140306 
    #   a10 config backup for aXAPI version: 2.1 
    # 
    # 
    ################################################# 
    A10IP="1.1.1.1 1.1.1.2"
    USER=admin 
    PASSWORD=a10 
    TODAY=`date "+%Y%m%d"` 
    BACKUPDIR=/path/$TODAY 
    TIMENOW=`date "+%Y%m%d%H%m"` 
    LOG="/tmp/mail"
    MAILLIST="ng@ng.com.tw"
     for COUNT in $A10IP do
     METHOD1="method=authenticateusername=$USERpassword=$PASSWORD"
     SESSION=`curl -k --data $METHOD1 https://$COUNT/services/rest/V2.1/ | sed -n -e 's/.*\(.*\)\/session_id>.*/\1/p'` 
     
     if [ ! -d $BACKUPDIR ];then
      mkdir -p $BACKUPDIR 
     fi
     
     GETHOST_M="session_id=$SESSIONmethod=system.hostname.get"
     GETHOST=`curl -k https://$COUNT/services/rest/V2.1/?$GETHOST_M | sed -n -e 's/.*\(.*\)\/hostname>.*/\1/p'` 
     FILENAME="$GETHOST-$TIMENOW.tar.gz"
     BACKUP_M="session_id=$SESSIONformat=jsonmethod=system.backup"
     BACKUP=`curl -k  https://$COUNT/services/rest/V2.1/?$M -o $BACKUPDIR/$FILENAME` 
     CLOSE_M="session_id=$SESSIONmethod=session.close"
     CLOSE=`curl -k https://$COUNT/services/rest/V2.1/?$CLOSE_M` done
     cd $BACKUPDIR echo "|----------- A10 System Backup notification ------------------|" > $LOG echo " " >>$LOG ls -la *.gz | awk '{print $5,$6,$7,$8,$9}' >> $LOG echo " " >> $LOG echo "|------------------------------------------------------------------|" >>$LOG
    上一篇:linux系统中的列出敏感用户的脚本代码
    下一篇:一键备份gitolite服务器的Shell脚本
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    a10 config backup for aXAPI a10,config,backup,for,aXAPI,a10,