#!/usr/bin/python3 # -*- coding: utf-8 -* #The config for global variable import os,sys,importlib importlib.reload(sys) #------------------------------------------------------------------ #必配置项 #黑方配置项,需满足下列配置参数,或将下列参数改为实际黑方中的参数 DPM_BC_IP = '10.10.21.140' #黑方IP DPM_BC_Url = 'https://'+DPM_BC_IP #黑方服务器访问URL WebPWD = 'test@2008' #管理员帐户通用密码包括aud_system,sec_system Dedup_Lib = 'cs' #重删介质名称 Black_ServerName = 'Black_Server' #服务器名称修改-服务器名称 agentdir = '/opt/bksoft/ubackup/web/webapps/bc6/download/install/linux/agent_linux_noarch_64.tar' #代理下载路径 agentzip = 'agent_linux_noarch_64.tar' #代理压缩包名 agentdir_st = '/opt/bksoft/ubackup/web/webapps/bc6/download/install/linux/agent_linux_x86_64.tar' #代理下载路径 agentzip_st = 'agent_linux_x86_64.tar' #代理压缩包名 java = '1.8' #代理安装版本 DM_module = '@dm@dm_logic@UFS' #代理安装组件 DMCDM_module = '@dm@dm_logic@dm_cdm@UFS' KL_module = '@kingbase@UFS' #代理安装组件 KP_module = '@kingbase_physical@UFS' #代理安装组件 KPCDM_module = '@kingbase_physical@kingbase_cdm@UFS' UXDB_module = '@uxdb' #代理安装组件 HighGo_module = '@highgo' #代理安装组件 ShenTong_module = '@shentong@UFS' #代理安装组件 ShenTongCDM_module = '@shentong@shentong_cdm@UFS' SequoiaDB_module = '@sequoiadb@UFS' #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #黑方参数默认项,如果黑方的下列默认参数修改了,相应的此处需修改 browser='firefox' Scripts_Path = os.path.split(os.path.realpath(__file__))[0] Scripts_Path = os.path.dirname(Scripts_Path) #Scripts_Path = Scripts_Path.decode('gbk') Sys_Admin = 'sys_admin' #系统管理员帐户 Aud_Admin = 'aud_admin' #审计管理员帐户 Sec_Admin = 'sec_admin' #安全管理员帐户 BCUser='unadba' #访问黑方服务器mysql数据库用户名 BCPwd='1223Bc@2008' #黑方服务器mysql数据库root用户密码 BCPort='3306' #访问黑方服务器mysql数据库端口号 BCDB='unary' #访问黑方服务器mysql数据库库名 SSHUser = 'root' #ssh登录黑方用户名 SSHPwd = '2008Bc1223!@#' #SSH登录黑方密码 SSHPort = '22' #SSH登录黑方端口号 #适配平台编写DPM自动化用例 PT = 'pt' #普通介质名称 #备份传入参数 Kingbase_Physical_Flow_NoCache ='2' #Kingbase_Physical没有缓存 Full_Bk = u'完全' #完全备份 Divergence_Bk = u'差量' #差量备份 Incre_Bk = u'增量' #增量 Y = 1 #操作 N = 0 #不操作 S = u'是' F = u'否' #DM备份恢复 DM_Agent_Name = 'DM' #DM代理名称 DM_HostIP = '10.10.21.200' #DM环境地址 DM_LoginUser = 'root' #系统登录用户 DM_LoginPWD = 'unary@2008' #系统登录密码 DM_Pwd = '111111111' #数据库登录密码 DMbk_type1 = u'完全' #备份类型:完全、差量、增量 DMbk_type2 = u'增量' DMbk_type3 = u'差量' DMbk_type4 = u'日志' agent_name = 'DM' #Uxdb备份恢复 Ux_Agent_Name = 'Uxdb' #DM代理名称 Ux_HostIP = '10.10.21.209' #DM环境地址 Ux_LoginUser = 'root' #系统登录用户 Ux_LoginPWD = 'unary@2008' #系统登录密码 Ux_User = 'uxdb' Ux_Pwd = 'unary@2008' #数据库登录密码 Uxbk_type1 = u'完全' #备份类型:完全、差量、增量 Uxbk_type2 = u'增量' agent_name = 'Uxdb' #Highgo备份恢复 Highgo_Agent_Name = 'Highgo' #Highgo代理名称 Highgo_HostIP = '10.10.21.167' #Highgo环境地址 Highgo_LoginUser = 'sysdba' #数据库登录用户 Highgo_LoginPWD = '123456' #数据库登录密码,365天后过期 Highgo_VMUser = 'root' #机器登录用户 Highgo_VMPwd = 'unary@2008' #机器登录密码 Highgobk_type1 = u'完全' #备份类型:完全、差量、增量 Highgobk_type2 = u'增量' Highgobk_type3 = u'差量' Highgo_agent_name = 'Highgo' #神通数据库备份恢复 ShenTong_HostName='ST' #神通代理主机名 ShenTong_UserName='sysdba' #神通数据库用户名 ShenTong_PWD='szoscar55' #神通数据库管理员密码 ShenTong_DBInstance='OSRDB' #神通数据库实例名 ShenTong_Port='2003' #神通数据库端口号 ShenTong_IP='127.0.0.1' ShenTong_HostIP='10.10.21.232' ShenTong_HostUser='root' ShenTong_HostPWD='unary@2008' ShenTong_DBUser='root' ShenTong_DBPWD='szoscar55' ShenTong_IntallPath_L = '/opt/ShenTong/bin' #Kingbase备份恢复 Kingbase_HostName = 'Kingbase' #Kingbase代理主机名 Kingbase_HostPWD = 'unary@2008' Kingbase_HostUser = 'root' Kingbase_User = 'SYSTEM' #连接Kingbase数据库用户名 Kingbase_PWD = '12345678ab' #连接Kingbase数据库用户密码 Kingbase_port = '54321' #Kingbase端口 Kingbase_HostIP = '10.10.21.176' #Kingbase代理主机ip #Kingbase_Physical流式备份恢复 Kingbase_Physical_HostName = 'KingbasePhysical' #Kingbase代理主机名 Kingbase_Physical_HostPWD = 'unary@2008' Kingbase_Physical_HostUser = 'root' Kingbase_Physical_DB_User = 'SYSTEM' #连接Kingbase数据库用户名 Kingbase_Physical_PWD = '12345678ab' #连接Kingbase数据库用户密码 Kingbase_Physical_port = '54321' #Kingbase端口 Kingbase_Physical_HostIP = '10.10.21.241' #Kingbase代理主机ip Kingbase_Physical_DBInstance = 'TEST' Kingbase_installuser = 'kingbase' Kingbase_binpath = '/opt/Kingbase/ES/V8/Server/bin' Kingbase_datapath = '/opt/Kingbase/ES/V8/data' Kingbase_archivepath = '/opt/Kingbase/ES/V8/archive' #Kingbase_Physical普通备份恢复 Kingbase_PhyNormal_HostName = 'KingbasePhysicalNormal' #Kingbase代理主机名 Kingbase_PhyNormal_HostPWD = 'unary@2008' Kingbase_PhyNormal_HostUser = 'root' Kingbase_PhyNormal_DB_User = 'SYSTEM' #连接Kingbase数据库用户名 Kingbase_PyhNormal_DB_PWD = '12345678ab' #连接Kingbase数据库用户密码 #Kingbase_Physical_port = '54321' #Kingbase端口 Kingbase_PhyNormal_HostIP = '10.10.21.242' #Kingbase代理主机ip #Kingbase_Physical_DBInstance = 'TEST' #SequoiaDB备份与恢复 SequoiaDB_cluster = 'SequoiaDB' SequoiaDB_slave = 'sdbserver1' SequoiaDB_HostIP = '10.10.21.58' SequoiaDB_User = 'root' SequoiaDB_Pwd = 'unary@2008' #Mysql备份与恢复 Mysql_HostName = 'sdbserver2' Mysql_DB_User = 'root' Mysql_DB_PWD = '123456' Mysql_DB_Port = '3306' Mysql_DB_IP_Remote = '10.10.21.59' Mysql_DB_IP_Local = '127.0.0.1' Mysql_DB = 'test' Mysql_TableName1 = 'Mysql_Bak_Tab01' Mysql_TableName2 = 'Mysql_Bak_Tab2' MysqlDump = '/opt/sequoiasql/mysql/bin' MysqlBinLog = '/opt/sequoiasql/mysql/bin' MysqlLog = '/var/lib/mysql' MysqlConfig = '/etc' Mysql_Full_Bk = u'完全' #完全备份 Mysql_Add_Bk = u'增量' #增量备份 #Postgresql备份恢复 PostSql_DB_User= 'sdbadmin' #Postgresql用户名 PostSql_DB = 'test' #数据库名称 PostSql_DB_Pwd = '123456' #Postgresql数据库用户密码 PostSql_HostName = 'sdbserver3' #postgresql数据库所在代理的主机名 PostSql_DB_IP = '10.10.21.65' #linux代理ip PostSql_DB_Port = '5432' #数据库连接端口 ###虚拟平台配置,环境配置 Esxi_IP = '10.10.121.21' Esxi_User = 'root' Esxi_PWD = 'test123456' BC_Snapshot = 'Config' #黑方快照 BC_VMX = '[data1] dd/dd.vmx' #黑方相关配置——初始化 UpdateTool_Path = 'C:\\UpdateTools\\UpdateTools.exe' #升级工具exe文件路径 Robot_Name = 'Administrator' Robot_Pwd = 'unary@2008' Robot_IP = '10.10.21.231' #DM8.1.1备份恢复 DM811_Agent_Name = 'DM811' #DM代理名称 DM811_HostIP = '10.10.21.219' #DM环境地址 DM_agent_name = 'DM811' #DM7备份恢复 DM7_Agent_Name = 'DM7' #DM代理名称 DM7_HostIP = '10.10.21.201' #DM环境地址 DM7_agent_name = 'DM7' #神通数据库备份恢复 ShenTong2_HostName='ST343' #神通代理主机名 ShenTong2_HostIP='10.10.21.166' #Kingbase_Physical流式备份恢复 Kingbase_PhysicalR3_HostName = 'KingbasePhysicalR3' #Kingbase代理主机名 Kingbase_PhysicalR3_HostIP = '10.10.21.243' #Kingbase代理主机ip #Kingbase_Physical普通备份恢复 Kingbase_PhyNormalR6_HostName = 'KingbasePhysicalNormalR67B' #Kingbase代理主机名 Kingbase_PhyNormalR6_HostIP = '10.10.21.154' #Kingbase代理主机ip