This document describes how to install and use the MySQL backup tool. 2.1 Function: Backup MySQL database every day. Mysql > mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh Backup the result file to zxindb1.sql, export all tables, stored procedures, functions, events and table Spaces for all databases, compress the export file and save the last two days of the export file, the file of the day is zxindb1.sql.gz, the file of the previous day is zxindb2.sql.gz. Applicable to database data volume is small, take up less space. 2, xtrabak.sh is installed in an environment where the official hot backup tool xtrabackup can be backed up using innobackupex command. The backup result is a copy of the entire MySQL data file, which only saves the exported data on the same day. It is suitable for the situation with a large number of databases and occupies a large space. Mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v: mysqldump -v
Print version information to prove that the command is available. (2) The database ensures that the binary file function is turned on. (3) Upload the script mysqlbak. Sh to the directory /home/ebaserdb/task in ASCII mode. (3) Upload the script mysqlbak. Chmod u+x mysqlbak.sh = /home/zxin10/task = /home/zxin10/task Mkdir -p /home/ebaserdb/etc/mysqlbak.ini = ‘/home/ebaserdb/etc/etc/mysqlbak.ini’; (5) to ebaserdb users perform vi/home/ebaserdb/task/mytabs editing mytabs files, add: 0 1 * / home/ebaserdb/task/mysqlbak. Sh > 2 > / dev/null & 1 set to become the daily 1:00 execution time, retired from save execution crontab/home/ebaserdb/task/mytabs gives effect to automate tasks. The first function init_configurable_env() initializes the configuration variable, in which the user needs to modify the configuration. The configuration details and instructions are as follows: Important Configuration: 1. /home/zxin10/cdr1 /home/zxin10/cdr2 /zxin10/cdr2 Such as: DIR=”/home/zxin10/cdr1 /home/zxin10/cdr2 /home/zxin10/lc2″ directory requires reference to service334.ini [convertCDr] : [convertCDr] : [convertCDr] : [convertCDr] : [convertCDr] : [convertCDr]; Do you need to save the file that is not given to the billing center isSaveNotToJF = 1; Save the directory NotToJFDir = c:\zxin10\nottojf\ Also need to set the number of days to save the bill notto be charged. Under the tag [checkpriceLog] checkpriceLogBakDays, it is recommended to set at least 3 days to save: [CheckPriceLog] ; CheckPriceLogBakDays = 3 service334.ini For each [business key] tag, iscdrBack is recommended to be set to 1 (backup) and BackCDRDir is configured. Backup days, a minimum of 3 days is recommended, such as business key 20: [20]; IscdrBack = 1,0; iscdrBack = 1,0; BackCDRDir = c:\zxin10\INCDRBack\,c:\zxin10\ISMPCDRBack\,; 3 Apply this setting to save the original CDR to all business keys 1,20,40,60, etc. The directory of the billing center file and the original CDR backup directory are not given: DIR=” c:\zxin10\nottojf\ c:\zxin10\INCDRBack\” The two directories will be named as day folders and will store the phone list files generated on the same day. The tool will search for the directory corresponding to the date of the day in the two directories and search for the phone list files. USERCODE=111111,22222 Please configure the alarm message sending number correctly.
- Alarm SMS send environment configuration check SMS send call LWP SMS group send function. SCR: [SCAP] SmitPno = 365 SmitModule = 188; Module number smitByteAdjust = 1. Execute zxTool-C to check if the link corresponding to smitModule is normal with user zxin10. If it is abnormal, the link between the main portal and the SMS interface machine (365 interface) needs to be configured according to the field situation.
Other configurations: It is not recommended to modify the following alarm and display record count configurations. They will take effect at their default values. You can also modify these configurations according to the instructions below. According to the time statistics of the peak volume of business record display number, effective range 1-1000, the default is 100, please set the positive integer: recordNum =100 monthly rent cost rise alarm threshold, unit %, the default is 60%, effective range 0-1000, such as 0 is not alarm, please set the positive integer: Money_ris_lim =60 Money_ris_lim =60 Alarm threshold for monthly rent decrease, unit %, default is 60%, effective range 0-100, if 0, no alarm, please set positive integer Money_dec_lim =60 alarm threshold for business increase, unit %, default is 70%, effective range 0-1000, If 0, no alarm, please set positive integer: SRV_RIS_LIM=70 Alarm threshold for business volume decline, unit %, default is 70%, effective range 0-100, if 0, no alarm, please set positive integer: SRV_DEC_LIM=70 Alarm threshold for increasing business volume according to device type, unit %, default is 80%, effective range 0-1000, if 0, no alarm, please set: The unit %, the default is 80%, the effective range is 0-100, if 0, no alarm, please set: positive integer DEV_DEC_LIM=80 alarm message sending time, start time. The default is between 8:00 in the morning (0800) and 20:00 in the evening (2000), please set positive integer: ALARM_BEGINTIME=0800 alarm message sending period, end time. The default is between 8:00 am and 20:00 PM. Please set a positive integer: ALARM_ENDTIME=2000 1.1. To install and use the tool, first make sure that the machine’s timer task function is enabled. 1. The script needs to be uploaded to /home/zxin10/task directory on the server where the 334 interface machine is located as ASCII user of zxin10. Log in as user zxin10, enter /home/zxin10/task, and execute chmod u+x serviceAlarm.sh. /home/zxin10/task/mytabs /mytabs 0 3 * / home/zxin10 / task/ServiceAlarm. Sh, set to become the daily 3:00 execution time, retired from save execution crontab/home/zxin10 / task/mytabs gives effect to automate tasks. 3. The result file of the tool is saved in /home/zxin10/service_alarm. The name of daily business volume and cost statistics by equipment type is: cdrdatastatyyymmdd.txt; The statistical result of business peak recorded ata certain time every day is: CDRTOPDATAYYYMMDD.TXT. Where yyyymmDD is the date of year month. 4. The log directory of the tool is /home/zxin10/service_alarm, and the log name is: servicealarm.log. 5. Tool Settings lock file, do not allow more than two procedures to run at the same time. The lock file is stored in the /home/zxin10/task directory and is named ServiceAlarm.lock. If the tool exits due to an exception, when it is run again, ServiceAlarm. Lock detected, maybe another copy of this script is running error in ServiceAlarm. Log You can go to /home/zxin10/task to delete the file. 1. For the daily call bill, count the call volume by business key and source device type in days, and issue a business statistics result file named cdrdatastatyyymmdd.txt, and the file format is as follows: Business key | | business key billed billed in the source device type | | total billed in the total cost of successful total | master billed billed business key which is 1, 20, 40, 60 this logo, for a month to fill 30. The business key of the phone order is the business key in the file name of the phone order. For example, the business key of the phone order 31 is 31.
- Billed in for a day, the timestamp field as the time to peak statistical basis, statistical results file a business peak: the file called: cdrtopdataYYYYMMDD. TXT, file content format for: billed in the timestamp | | total billed billed for success Including N before peak point of business every day.