CN102929746A - Quick backup and recovery method for lottery sale system - Google Patents

Quick backup and recovery method for lottery sale system Download PDF

Info

Publication number
CN102929746A
CN102929746A CN2012103786943A CN201210378694A CN102929746A CN 102929746 A CN102929746 A CN 102929746A CN 2012103786943 A CN2012103786943 A CN 2012103786943A CN 201210378694 A CN201210378694 A CN 201210378694A CN 102929746 A CN102929746 A CN 102929746A
Authority
CN
China
Prior art keywords
backup
disk
sale system
lottery
lottery sale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012103786943A
Other languages
Chinese (zh)
Inventor
张广源
罗春水
黄河
郭建军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHINA SPORTS LETTWAY TECHNOLOGY DEVELOPMENT Co Ltd
Original Assignee
CHINA SPORTS LETTWAY TECHNOLOGY DEVELOPMENT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHINA SPORTS LETTWAY TECHNOLOGY DEVELOPMENT Co Ltd filed Critical CHINA SPORTS LETTWAY TECHNOLOGY DEVELOPMENT Co Ltd
Priority to CN2012103786943A priority Critical patent/CN102929746A/en
Publication of CN102929746A publication Critical patent/CN102929746A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the fields of computer operation systems and application software, and provides a method for carrying out quick backup and recovery on a sports lottery sale system.

Description

A kind of quick backup and restoration methods for lottery sale system
Technical field
The invention belongs to computer operating system and application software field, relate to a kind of method for lottery sale system being carried out quick backup and recovery.
Background technology
Current, domestic sports lottery ticket commercial networks come sell lottery tickets by the lottery ticket sales terminal mostly, on each lottery ticket sales terminal lottery sale system is installed all, this lottery sale system comprises operating system and the lottery ticket sales program that is installed on this operating system.If existing lottery sale system runs into the problems such as disk error, cause operating system to guide, then can't carry out normal sale, the technician must arrive the commercial networks that break down and reinstall system.And the technician reinstalls the time of a required cost in site, and at least half a day, couple of days has affected the normal operation of commercial networks to a great extent at most, has also increased simultaneously the human cost of safeguarding.
In addition, the mistake of Data Update also can appear in existing lottery sale system once in a while, also can cause system crash in this case, reset to the doorstep except non-technical personnel, otherwise normal operation that can not recovery system.Same, solve this fault and also can expend a large amount of time and manpower.
Summary of the invention
Purpose of the present invention just provides a kind ofly carries out the method for fast quick-recovery to lottery sale system, provides simultaneously a kind of current system is carried out the method for quick backup, expends the problem of plenty of time and manpower to solve the prize recovery of marketing system of prior art.
Fig. 1 shows the method that the present invention carries out system backup, mainly may further comprise the steps: 101, and the user carries out power-off operation, activates backup process; 102, derive disk space; 103, derive configuration; 104, the cleaning garbage files; 105, open backup area, and check the backup condition; 106, remove unwanted block device; 107, the data of workspace are backuped to backup area; 108, the deletion disk of safety; 109, enter the normal shutdown flow process.
Fig. 2 shows the present invention and carries out the method that system is recovered, and mainly may further comprise the steps: 201, and start, user selection recovers standby system; 202, system's guiding enters the system that simplifies the operation; 203, check service condition, such as user, disk space etc.; 204, check the backup integrality; 205, the format workspace; 206, open the workspace; 207, the reduction standby system; 208, the restorer node; 209, close current operation system.
Description of drawings
Fig. 1 is the method flow diagram that the present invention carries out system backup;
Fig. 2 is that the present invention carries out the method flow diagram that system is recovered.
Embodiment
Introduce in detail a typical embodiment below in conjunction with accompanying drawing.
In order to use technical scheme proposed by the invention, at first be disk of lottery ticket sales terminal configuration, this disk can be the DOM dish, also can be the high rotating speed hard disk of IDE.This disk is divided into two districts: workspace and backup area.Wherein, shared space, workspace approximately is 70% of whole disk space, and backup area accounts for about 30%.The lottery sale system that uses when normal ticketing is stored in the workspace comprises operating system and the lottery ticket sales program that is installed on this operating system.And backup area is used for system that simplifies the operation (for example MiniRoot system) that only has Shell of storage, and this system of simplifying the operation can carry out the solution press operation of compressed package, and backup area also is used for the storage backup file in addition.According to the reality measuring and calculating, minimized Iinux operating system probably accounts for the space about 15M, and the backup file after the existing lottery sale system compression is probably had 80-100M, and therefore whole disk space should be greater than 512M.
When lottery sale system is backed up, need first the data in the main partition to be compressed, can carry out compression and decompression with bzip2 or gzip instrument.Wherein, bzip2 can obtain higher ratio of compression, but its shortcoming time that to be compression and decompression spent is long, that is, the time of backup-and-restore is long.Also can adopt the gzip instrument to carry out compression and decompression, although ratio of compression can hang down, the backup-and-restore process is consuming time obviously will lack.Following table 1 shows and adopts bzip2 and gzip instrument to compress time with decompress(ion).
Compare item bzip2 gzip
Decrement 60M 63M
Compression time 25 seconds 13 seconds
Decompression time 20 seconds 5 seconds
Table 1
If disk space is not very narrow, consider that from the efficiency comes first angle suggestion adopts the gzip instrument to carry out compression and decompression.
In addition, the spent time length of backup-and-restore is also relevant with the performance of disk itself with terminal.Following table 2 showed when the terminal type that adopts different performance, the used time of MiniOS system of a 166M of backup-and-restore.
Table 2
Wherein, the performance of LA800W type is better than La600A, and as seen, the speed of the terminal backup-and-restore that performance is good obviously is better than the general terminal of performance.In addition, when practical application was backed up, compression time may be slightly longer than the time that upper table is put down in writing, and the estimation of LA600A type is the longest can not to surpass 15 seconds, that is, monolithic backup was finished within 2 minutes.And the good type BACKUP TIME of other performance is probably at 50-120 between second.
Namely can begin on the basis of the above the work backing up and recover, at first will current lottery sale system be backed up, mainly comprise the steps (referring to Fig. 1):
101, the user carries out shutdown, activates backup.When the user carries out shutdown command, init shutdown process can be dispatched the halt service, and the present invention right/etc/rc.d/init.d/halt service revises, increased at the halt server/fill order of sbin/bakafter, therefore, before disk is closed in the halt execution, can continue to carry out following backup process.And why select this time point, and be because system program been has no longer has been read and write disk, back up safer this moment.
102, derive disk space.Can calculate the total volume of disk in this step, the purpose of calculating disk size is to judge that this disk has and do not have enough spaces to be used for standby system.If there are not enough spaces to come standby system, then can to user's alarm, then jump out backup procedure and carry out the normal shutdown flow process.Because our disk space of selection is enough to hold standby system usually, the continuity that therefore shows for flow process, this accidental situation of not shown insufficient space in Fig. 1 of the present invention, but carry out according to the flow process of normal condition.In the other parts and Fig. 2 of Fig. 1, based on same consideration also not shown various accidental situation, but the record by this instructions word segment, for the accidental situation that may occur, those skilled in the art should understand and correctly process.
103, derive configuration.Derive configuration and from configuration file, read exactly parameter.These parameters comprise: whether catalogue, the backup functionality that the backup subregion hangs over root file system allow operation, backup failure number of times, back up how long once need, expired times etc.
104, the cleaning garbage files.Garbage files mainly refers to the journal file of the temporary file that produces in system's installation, the program operation process, the installation kit that does not re-use, system's operation etc.
105, open backup area, and check the backup condition.
The backup condition is judged from the configuration of deriving, is mainly comprised:
1) whether backup functionality allows operation;
At configuration file a configuration item is arranged, if configuration item is true, during shutdown, can start backup; Otherwise, just do not back up.If closed backup functionality in the configuration file, then can and jump out backup procedure to user's alarm this moment, carry out the normal shutdown flow process.
2) backup failure number of times.
If backup failed 3 times continuously then can and be jumped out backup procedure to user's alarm equally, carry out the normal shutdown flow process.If this situation occurs, illustrate that terminal has unusually, backup has not had purposes.
106, removing does not need the block device that backs up.
Block device generally is memory device, disk unit etc., and these equipment represent first subregion of first disk such as/dev/hda1 generally under/dev/ catalogue.Because backup itself is exactly the backup that disk file is carried out, so, during backup, these block files be ignored, otherwise backup failure can be caused.Do not need the block device that backs up, comprising :/dev/hda1 ,/dev/hdc1 ,/dev/loop1 ,/dev/ram1 etc.
107, the data of workspace are backuped to backup area.Namely use gzip that the data of workspace are compressed, and the file after will compressing is kept at backup area, simultaneously the workspace checked, and guidance information is set.After backup is finished, backup result is calculated a MD5 value, and be stored in backup area.
108, the deletion disk of safety.The elder generation timing disk, with data cached write disk after, delete again disk.If by force deletion, possible some data also at the buffer zone of disk, can cause the disk file mistake.
109, enter the normal shutdown flow process.
So just finished the backup of system, because backup needs the time (generally need 30-60 second), some user may not want to back up, and that user can change the configuration item in the configuration file into false.Like this, the process of above-mentioned backup will can not be performed in shutdown.
After lottery sale system is backed up, if run into the situations such as system crash or disk error so that lottery sale system can't normal boot, then can adopt following steps that (referring to Fig. 2) recovered in system:
201, start, user selection recovers standby system.The invention provides one herein and carry out the Grub interface that system is selected, requiring user selection is normally to enter master operating system or recover standby system, if user selection recovers standby system, and the flow process below then continuing to carry out.
202, system's guiding enters the system that simplifies the operation.This system storage that simplifies the operation can be that this system can carry out the solution press operation of compressed package such as the miniature Iinux such as MiniRoot system at backup area.
203, check service condition, such as user, disk space etc.Check the user just to refer to whether the active user is the power user, if not the power user or there is not superuser right, do not allow to continue this and recover flow process, jump out, and close current operation system; Whether the chkdsk gross space greater than predetermined value, for example 512M.If less than predetermined value, illustrate that disk does not possess the recovery condition, jump out, and close current operation system.
204, check the backup integrality.The MD5 value of the source file of generation checks the integrality of backup after finishing according to backup.As not mating, then can't recover, jump out and close current operation system.
205, the format workspace.
206, open the workspace.
207, the reduction standby system.With gzip the compressed file solution of backup area is depressed into the workspace.
208, the restorer node.Under linux system, some device node is the device node of sports lottery ticket special use, such as USBKey equipment.When these device nodes recover in system, need to recover in the lump.Because system does not back up/ device node under the dev/, so, when recovering in system, need the device node of special recovery sports lottery ticket special use.
209, close current operation system.
So far, if normal words, the sports lottery ticket marketing system is successfully recovered.The user starts shooting again, selects normally to enter the sports lottery ticket marketing system after master operating system can enter into recovery.

Claims (8)

1. backup method that is used for lottery sale system, described lottery sale system is installed on the disk of lottery ticket sales terminal, described lottery sale system comprises operating system and the lottery ticket sales program that is installed on this operating system, it is characterized in that described disk is divided into workspace and backup area, described lottery sale system is installed in described workspace, when the operation lottery sale system, carries out following steps:
1) activates backup process by carrying out shutdown;
2) derive disk space;
3) derive configuration;
4) cleaning garbage files;
5) open backup area, and check the backup condition;
6) remove and do not need the block device that backs up;
7) utilize tool of compression that the data of workspace are backuped to backup area, generate backup file;
8) described backup file is calculated the MD5 value, be stored in backup area;
9) safety deleting disk;
10) shutdown.
2. the backup method for lottery sale system as claimed in claim 1, wherein, described derivation disk space comprises the total volume of calculating disk, judges whether the space of described disk can hold standby system.
3. the backup method for lottery sale system as claimed in claim 1, wherein, described derivation configuration comprises reads parameter from configuration file, described parameter comprises: whether catalogue, the backup functionality that the backup subregion hangs over root file system allow operation, backup failure number of times, back up how long once need, expired times.
4. the backup method for lottery sale system as claimed in claim 1, wherein, described backup condition judges comprise: whether backup functionality allows operation and backup failure number of times from the parameter that described derivation configuration is read.
5. the backup method for lottery sale system as claimed in claim 1, wherein, described safety deleting disk comprises first timing disk, with data cached write disk after, delete again disk.
6. restoration methods that is used for lottery sale system, the method are based on that described backup file that the described backup method of claim 1 generates carries out, and comprise the steps:
1) start selects to recover standby system;
2) system's guiding enters the system that simplifies the operation;
3) service condition of inspection recovering process;
4) integrality of the described backup file of inspection;
5) format workspace;
6) open the workspace;
7) utilize tool of compression that the described backup file in the backup area is decompressed to the workspace;
8) restorer node;
9) close current operation system.
7. the restoration methods for lottery sale system as claimed in claim 6, wherein, the service condition of described inspection recovering process comprises and checks that whether the active user is whether power user and chkdsk gross space are greater than predetermined value.
8. the restoration methods for lottery sale system as claimed in claim 6, wherein, the integrality of described inspection backup file comprises the integrality that checks backup by the MD5 value of described backup file.
Restoration methods for lottery sale system as claimed in claim 6, wherein, described restorer node comprises the sports lottery ticket specialized equipment node under recovery/dev catalogue.
CN2012103786943A 2012-10-09 2012-10-09 Quick backup and recovery method for lottery sale system Pending CN102929746A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012103786943A CN102929746A (en) 2012-10-09 2012-10-09 Quick backup and recovery method for lottery sale system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012103786943A CN102929746A (en) 2012-10-09 2012-10-09 Quick backup and recovery method for lottery sale system

Publications (1)

Publication Number Publication Date
CN102929746A true CN102929746A (en) 2013-02-13

Family

ID=47644552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012103786943A Pending CN102929746A (en) 2012-10-09 2012-10-09 Quick backup and recovery method for lottery sale system

Country Status (1)

Country Link
CN (1) CN102929746A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881299A (en) * 2014-02-28 2015-09-02 可牛网络技术(北京)有限公司 Application program freezing method and apparatus
CN106652152A (en) * 2016-10-17 2017-05-10 深圳市穗彩科技开发有限公司 Data storage method and device for electronic lottery drawing system
CN108021470A (en) * 2017-10-27 2018-05-11 努比亚技术有限公司 A kind of data backup method, mobile terminal and computer-readable recording medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534490A (en) * 2003-03-31 2004-10-06 联想(北京)有限公司 Realization method of computer hard disk data restoring and back-up
CN102207881A (en) * 2011-07-07 2011-10-05 电子科技大学 Quick operation system start-up method based on Android
CN102541685A (en) * 2011-11-16 2012-07-04 中标软件有限公司 Linux system backup method and Linux system repair method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1534490A (en) * 2003-03-31 2004-10-06 联想(北京)有限公司 Realization method of computer hard disk data restoring and back-up
CN102207881A (en) * 2011-07-07 2011-10-05 电子科技大学 Quick operation system start-up method based on Android
CN102541685A (en) * 2011-11-16 2012-07-04 中标软件有限公司 Linux system backup method and Linux system repair method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
郝永芳: "Linux系统裸机备份与恢复的设计和实现", 《中国海洋大学学报》 *
黄嵘: "电脑彩票全热线系统的总体设计", 《中国优秀硕士学位论文全文数据库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881299A (en) * 2014-02-28 2015-09-02 可牛网络技术(北京)有限公司 Application program freezing method and apparatus
CN106652152A (en) * 2016-10-17 2017-05-10 深圳市穗彩科技开发有限公司 Data storage method and device for electronic lottery drawing system
CN108021470A (en) * 2017-10-27 2018-05-11 努比亚技术有限公司 A kind of data backup method, mobile terminal and computer-readable recording medium

Similar Documents

Publication Publication Date Title
US20210011817A1 (en) Virtual Machine Recovery Method and Virtual Machine Management Device
CN102833281B (en) It is a kind of distributed from the implementation method counted up, apparatus and system
CN110502365A (en) The method, apparatus and computer equipment they data storage and restored
CN103345470A (en) Database disaster tolerance method, database disaster tolerance system and server
CN110221938A (en) The method and storage medium of electronic device, block chain common recognition
CN102411523A (en) Method and device for storing file backups and backup method for file systems
CN104714863A (en) Method for completely storing Raid card logs on basis of Linux operation system after system crashes
US20020002448A1 (en) Means for incorporating software into avilability models
US20190227710A1 (en) Incremental data restoration method and apparatus
CN105959169B (en) A kind of transaction data processing system and method
CN110825562B (en) Data backup method, device, system and storage medium
CN104750755A (en) Method and system for recovering data after switching between main database and standby database
CN109308242A (en) A kind of dynamic monitoring and controlling method, device, equipment and storage medium
CN111666266A (en) Data migration method and related equipment
CN101763294A (en) Method for looking up and backing up system operation log according to time slots
CN102929746A (en) Quick backup and recovery method for lottery sale system
CN104536852A (en) Data recovery method and device
CN103399714B (en) The maintenance system of storage device configurations information and using method thereof
CN111062503B (en) Power grid monitoring alarm processing method, system, terminal and storage medium
CN111176827B (en) Data preheating method and related device
US7979238B2 (en) System, method and computer program product for evaluating a test of an alternative system
CN100395706C (en) Automatic start method of switchboard plate
CN103440179B (en) The continuous store method of storage device configurations information
CN110928492A (en) Hard disk replacement method, system, terminal and storage medium of distributed file system
US20160085638A1 (en) Computer system and method of identifying a failure

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20130213

RJ01 Rejection of invention patent application after publication