CN108459925A - The restorative procedure of private clound equipment and its database, the device with store function - Google Patents
The restorative procedure of private clound equipment and its database, the device with store function Download PDFInfo
- Publication number
- CN108459925A CN108459925A CN201810144886.5A CN201810144886A CN108459925A CN 108459925 A CN108459925 A CN 108459925A CN 201810144886 A CN201810144886 A CN 201810144886A CN 108459925 A CN108459925 A CN 108459925A
- Authority
- CN
- China
- Prior art keywords
- database
- data
- damaged
- tables
- repaired
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000008439 repair process Effects 0.000 claims description 45
- 230000006870 function Effects 0.000 claims description 18
- 230000001771 impaired effect Effects 0.000 claims description 7
- 230000001360 synchronised effect Effects 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 5
- 238000012360 testing method Methods 0.000 abstract description 14
- 238000010586 diagram Methods 0.000 description 13
- 238000003780 insertion Methods 0.000 description 7
- 230000037431 insertion Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 230000007774 longterm Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000009825 accumulation Methods 0.000 description 2
- 238000013523 data management Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 210000003128 head Anatomy 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 210000003733 optic disk Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000005067 remediation Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/80—Database-specific techniques
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses the restorative procedure of a kind of private clound equipment and its database, with the device of store function.The private clound equipment accesses to file system by database, which includes:Whether Test database is damaged;If database is damaged, database is repaired;When the reparation for detecting database is completed, the file part of database being repaired in the file system corresponding to part is determined;Obtain the file part data before database is damaged;File part data update before database is damaged is repaired part to its corresponding database.In this way, it can realize the reparation to private clound database, the access efficiency of private clound installable file system can be improved.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of private clound equipment and its reparation side of database
Method, the device with store function.
Background technology
With the development of cloud computing, private cloud storage is increasingly becoming government, enterprise, family are used.Due to private clound
Have the characteristics that high-performance, large capacity, Dynamic expansion and safely controllable, can make government department, enterprise and family by its
The file of long-term accumulation carries out centrally stored and effectively shared.
The file system of private clound equipment can provide file-sharing service to the user, be created, changed to file, be deleted
It is serviced except equal.To promote the access efficiency of this document system, can be accessed to this document system by database.
But present inventor has found in long-term research and development, in currently available technology, due to private clound equipment
Power-off or other operations are easy to cause database corruption, when making hard disk of the database write-back to private clound equipment, grasp
Work fails.
Invention content
The application is mainly solving the technical problems that providing the restorative procedure of a kind of private clound equipment and its database, having
The device of store function improves the access efficiency of private clound installable file system to realize the reparation to private clound database.
In order to solve the above technical problems, the technical solution that the application uses is:A kind of private clound device data is provided
The restorative procedure in library, private clound equipment access to file system by database, which includes:Test database
Whether it is damaged;If database is damaged, database is repaired;When the reparation for detecting database is completed, determine
The file part of database being repaired in the file system corresponding to part;Obtain the file part before database is damaged
Data;File part data update before database is damaged is repaired part to its corresponding database.
Wherein, include before whether above-mentioned Test database is damaged:Judge whether to detect that the operation of database is lost
Instruction is lost, if detecting, executes the whether impaired step of above-mentioned Test database;Wherein, at least to the operation of database
Including:The data of file system are synchronized to database, are accessed to database and any one of turn-on data library.
Wherein, it is above-mentioned database is repaired before include:When the unlatching for detecting database successfully instructs, obtain
Take the table restoration information of database;The reparation state of database is obtained from table restoration information;Judge whether reparation state is
It repairs;If it is not, then executing the step of being repaired to database.
Wherein, it is above-mentioned to database carry out repair include:Database is carried out in repair process if detecting database
Out code, then interrupt operation to database, and close database.
Wherein, it is above-mentioned to database carry out repair include:Obtain the damage of the table restoration information and database of database
The table information of tables of data, wherein table restoration information includes at least the table information of tables of data and the repairing for partial data table of database
Complex information;Judge whether table restoration information includes restoration information corresponding with the table information of tables of data has been damaged, wherein damaged
The corresponding restoration information of table information of tables of data includes at least the reparation state for having damaged tables of data;If table restoration information include with
The corresponding restoration information of table information of tables of data is damaged, then from restoration information corresponding with the table information of tables of data has been damaged
The reparation state for having damaged tables of data is obtained, and judges to have damaged whether the reparation state of tables of data is to have repaired;If it is not, then right
Tables of data has been damaged to be repaired;If table restoration information does not include restoration information corresponding with the table information of tables of data has been damaged,
The restoration information for having damaged tables of data is then generated, and the reparation state for having damaged tables of data is updated to start to repair, and to
Damage tables of data is repaired;When detecting that instruction is completed in the reparation for having damaged tables of data, the reparation of tables of data will have been damaged
State is updated to repair.
Wherein, the table information for having damaged tables of data further comprises the type for having damaged tables of data, is obtaining database
It has damaged after the table information of tables of data and has included:Damage whether tables of data is repairing according to the table information judgement of damage tables of data
It is multiple;If it is not, then obtaining the type for having damaged tables of data from table information;Judgement has damaged whether the type of tables of data is files classes
Type;Judge whether table restoration information includes the step of restoration information corresponding with the table information of tables of data has been damaged if so, executing
Suddenly;Include to having damaged tables of data and repair:Delete the broken parts for having damaged tables of data.
Wherein, it is above-mentioned database is damaged before file part data update be repaired portion to its corresponding database
Divide and includes:Judge the file part data before database is damaged whether in database;If it is not, then file part data are inserted into
Database is repaired part.
Wherein, further comprise later by the part that is repaired in file part insertion of data into data library:Judge file
Partial data is inserted into whether being repaired for database partly succeeds;If it is not, whether then execute Test database again impaired
Step.
In order to solve the above technical problems, another technical solution that the application uses is:A kind of private clound equipment is provided, it should
Private clound equipment accesses to file system by database, and private clound equipment includes:Processor, processor are used for testing number
Whether it is damaged according to library;If database is damaged, processor repairs database;Processor is for detecting data
When the reparation in library is completed, the file part of database being repaired in the file system corresponding to part is determined;Processor is used for
File part data before database is damaged are obtained, and the file part data update before database is damaged is right to its
The database answered is repaired part;Memory is coupled with processor, the memory data in library and file system for storing data
The data of system.
In order to solve the above technical problems, another technical solution that the application uses is:It provides a kind of with store function
Device, be stored thereon with program data, program data is performed the step realized in the above method.
The advantageous effect of the embodiment of the present application is:It is different from the prior art, the embodiment of the present application private clound equipment passes through number
It accesses to file system according to library, the restorative procedure of the embodiment of the present application private clound device databases includes:Test database
Whether it is damaged;If database is damaged, database is repaired;When the reparation for detecting database is completed, determine
The file part of database being repaired in the file system corresponding to part;Obtain the file part before database is damaged
Data;File part data update before database is damaged is repaired part to its corresponding database.Due to data
The data in library are derived from file system, and file system can be repaired part for database and provide Backup Data, therefore, using from text
The mode that the part that data update database is repaired is obtained in part system, can realize repairing to the database of private clound equipment
It is multiple, so as to ensure that private clound equipment normally accesses file system by database, therefore the visit of file system can be improved
Ask efficiency.
Description of the drawings
Fig. 1 is the structural schematic diagram of one embodiment of the application private clound equipment;
Fig. 2 is the flow diagram of the restorative procedure first embodiment of the application private clound device databases;
Fig. 3 be Fig. 2 embodiment private clound device databases restorative procedure in step S202 idiographic flow schematic diagram;
Fig. 4 is another detailed process signals of step S202 in the restorative procedure of Fig. 2 embodiment private clound device databases
Figure;
Fig. 5 be Fig. 2 embodiment private clound device databases restorative procedure in step S205 idiographic flow schematic diagram;
Fig. 6 is the flow diagram of the restorative procedure 3rd embodiment of the application private clound device databases;
Fig. 7 is the structural schematic diagram of another embodiment of the application private clound equipment;
Fig. 8 is the structural schematic diagram for one embodiment of device that the application has store function.
Specific implementation mode
Private clound equipment has the advantages that high-performance, large capacity, Dynamic expansion and safely controllable, can make portion of government
The file of its long-term accumulation is carried out centrally stored and effectively shared, private clound equipment generally use text by door, enterprise and family
Part system is managed mass data and file.But huge data can cause the access efficiency to file system not high.For
This, needs that database is arranged in private clound equipment, by database in file system data or file access, such as
Shown in Fig. 1, Fig. 1 is the structural schematic diagram of one embodiment of the application private clound equipment.The present embodiment private clound equipment 101 is equipped with
Database 102 and file system 103, database 102 can pass through number as the access window of file system 103, user
According to library 102 in file system 103 data or file access, such as classification, inquiry.
Database is to come tissue, storage and the warehouse for managing data according to data structure, and data management can not only store
With management data, and the mode of the required various data managements of user can be transformed into.The database 102 of the present embodiment has
Body can be oracle, sybase, informix, microsoft sql server, microsoft access, visual
Foxpro etc..
Although the present embodiment private clound equipment 101, which accesses to file system 103 using database 102, can improve text
The access efficiency of data or file in part system 103, but under the operations such as 101 accident power-off of private clound equipment or soft-off, number
It is easily damaged according to library 102, so as to cause that can not access to file system 103.
For this purpose, the application it is further proposed that the private clound device databases of first embodiment restorative procedure, to realize private
There is the reparation of 101 database 102 of cloud equipment, improves the access efficiency of file system 103.Specifically, as shown in Fig. 2, the application
The restorative procedure of private clound device databases includes the following steps:
Step S201:Whether Test database 102 is damaged.
Database 102 is damaged there are many situation, and it refers to database that the database 102 involved by the present embodiment, which is damaged,
Tables of data in 102 is damaged.Certainly, in other embodiments, database, which is damaged, can also be that database head is damaged
Situation.
Whether the tables of data of the present embodiment Test database 102 is damaged the mistake that can be specifically reported according to database 102
Error code judges.
Step S202:If database 102 is damaged, database 102 is repaired.
If database 102 is not damaged, other operations are done to database 102.
In the present embodiment to the reparation of database 102 refer to by the data of impaired database 102 or file repair to
Can normal use database 102 data or file process, the specific repair process of database 102 will chat below
It states.
Optionally, as shown in figure 3, Fig. 3 be Fig. 2 embodiment private clound device databases restorative procedure in step S202
Idiographic flow schematic diagram.The method of the present embodiment includes the following steps:
Step S301:The table restoration information of database 102 and the table information for having damaged tables of data of database 102 are obtained,
Wherein, table restoration information includes at least the table information of the tables of data of database 102 and the restoration information of partial data table.
The table information of tables of data includes at least any one of table name, type and the ID of tables of data.
1 table restoration information of table
In the repair process of tables of data, the tables of data being repaired before can update restoration information in table restoration information
In.
The private clound equipment 101 of the present embodiment is the database repair process that is controlled by processor (not shown) to data
What library 102 was repaired, after Test database 102 is damaged, database 102 by error code in addition to being reported to processor, also
By the table information reporting for the tables of data damaged in database 102 to processor.
Step S302:Judge whether table restoration information includes restoration information corresponding with the table information of tables of data has been damaged,
Wherein, the corresponding restoration information of table information for having damaged tables of data includes at least the reparation state for having damaged tables of data.If so,
S303 is entered step, if it is not, then entering step S305.
Step S303:It is obtained from restoration information corresponding with the table information of tables of data has been damaged and has damaged repairing for tables of data
Multiple state, and judge to have damaged whether the reparation state of tables of data is to have repaired.If it is not, then enter step S304, if it is not, then into
Enter step S307.
In an application scenarios, if the table information that database 102 reports is " Table A, file, 123 ", obtained from table 1
Take restoration information " data 1 (reparation), data 2 (reparation) " corresponding with table information " Table A, file, 123 ", it is known that, Table A
Reparation state be " reparation ", then enter step S305;In another application scene, if the table information that database 102 reports
For " table B, picture, 456 ", it is known that, in table 1 not with table information " table B, picture, 456 ", corresponding restoration information, then enter step
Rapid S305.
Step S304:It is repaired to having damaged tables of data, and enters step S306.
Step S305:The restoration information for having damaged tables of data is generated, and the reparation state for having damaged tables of data is updated to
Start to repair, and repair to having damaged tables of data.
What is generated has damaged the restoration information of tables of data and has been stored in table restoration information.
Step S306:When detecting that instruction is completed in the reparation for having damaged tables of data, the reparation shape of tables of data will have been damaged
State is updated to repair.
Step S307:It repairs and completes, and carry out data update.
Enter subsequent step S203.
The database 102 of private clound equipment 101 can be in isolated operation by multiple application access, different applications simultaneously
State, when multiple applications fail to database access, multiple database repair processes can be triggered simultaneously, for improve database
102 remediation efficiency should avoid database 102 from being repeated to repair by multiple database repair processes simultaneously.
For this purpose, the application it is further proposed that Fig. 4 embodiments method, set as shown in figure 4, Fig. 4 is Fig. 2 embodiment private clounds
Another idiographic flow schematic diagrams of step S202 in the restorative procedure of standby database.The present embodiment specifically includes following steps:
Step S401:Obtain the table restoration information of database 102, wherein table restoration information includes at least database 102
The table information of tables of data and the restoration information of partial data table.
Step S401 is identical as the step S301 of above-described embodiment, does not repeat here.
Step S402:Judge to have damaged whether tables of data is repairing according to the table information for having damaged tables of data.If it is not, then into
Enter step S403, if so, entering step S411.
If having damaged tables of data repairing, illustrate that another database repair process has been damaged tables of data to this and carried out
It repairs, then exits database and repair process, tables of data has been damaged to this to avoid repetition and has been repaired.
Step S403:The type for having damaged tables of data is obtained from table information.
In an application scenarios, if the table information that database 102 reports is " Table A, file, 123 ", obtained from table 1
Take table information " file ".
Step S404:Judgement has damaged whether the type of tables of data is file type.If so, S405 is entered step, if
It is no, then enter step S412.
Step S405:Judge whether table restoration information includes restoration information corresponding with the table information of tables of data has been damaged,
Wherein, the corresponding restoration information of table information for having damaged tables of data includes at least the reparation state for having damaged tables of data.If so,
S406 is entered step, if it is not, then entering step S408.
Step S406:It is obtained from restoration information corresponding with the table information of tables of data has been damaged and has damaged repairing for tables of data
Multiple state, and judge to have damaged whether the reparation state of tables of data is to have repaired.If it is not, S407 is then entered step, if so, into
Enter step S410.
Step S405 is identical as the step S302 of above-described embodiment, the step S303 phases of step S406 and above-described embodiment
Together, it does not repeat here.
Step S407:The broken parts for having damaged tables of data are deleted, and enter step S409.
Step S408:The restoration information for having damaged tables of data is generated, and the reparation state for having damaged tables of data is updated to
Start to repair, and deletes the broken parts for having damaged tables of data.
For the tables of data of file type, the present embodiment is repaired using the above method, so that tables of data can normally make
With.Certainly, in other embodiments, impaired tables of data can also be repaired using other manner.It is different types of
Tables of data may be used identical or different method and be repaired.
Step S409:When detecting that instruction is completed in the reparation for having damaged tables of data, the reparation shape of tables of data will have been damaged
State is updated to repair.
Step S409 is identical as the step S306 of above-described embodiment, does not repeat here.
Step S410:It repairs and completes, and carry out data update.
Step S410 is identical as the step S307 of above-described embodiment, does not repeat here.
Step S411:Terminate this reparation.
Step S412:Using other repair modes.
Step S203:Detect database 102 reparation complete when, determine database 102 be repaired part institute it is right
File part in the file system 103 answered.
Only allow database 102 that can work normally it is found that being repaired to database 102 by above-mentioned analysis, in data
Database 102 can be caused to be repaired the data of part or the loss of file in the repair process in library 102, at this time, it may be necessary to losing
Data or file be updated, to restore the data before database 102 is damaged or file.
File system 103 is the data system of private clound equipment 101, and database 102 is that file system 103 is external just
Data or file in the window that user accesses, database 102 are derived from file system 103, exist centainly between the two
Mapping relations.Therefore, data or file in file system can be utilized to update the data impaired tables of data in library 102, when
So, the file part in the file system 103 of database 102 being repaired corresponding to part should be determined first, subsequently to obtain
Take the file part data before database 102 is damaged.
Step S204:Obtain the file part data before database 102 is damaged.
Specifically, the method for the present embodiment can be obtained by interface function Create_table_rec () in database
102 be damaged before file part data.
Step S205:File part data update before database 102 is damaged to its corresponding database 102 quilt
Repair part.
Update described in the present embodiment can be accomplished in several ways, for example, data replacement, insertion etc..For example, according to
The mode repair data table for the data or file that above-mentioned deletion has damaged, the then mode that insertion may be used update the data library 102
The part being repaired.
Specifically, as shown in figure 5, Fig. 5 be Fig. 2 embodiment private clound device databases restorative procedure in step S205
Idiographic flow schematic diagram.The method of the present embodiment includes the following steps:
Step S501:Judge the file part data before database 102 is damaged whether in database 102.If it is not, then into
Enter step S502, if so, entering step S505.
If database 102 be damaged before file part data in database 102, without any operation.
Step S502:File part insertion of data into data library 102 is repaired part.
Optionally, in repair process, database 102 may be damaged again, for this purpose, the method for the present embodiment can be with
Further comprise step S503 and step S504.
Step S503:Judge file part insertion of data into data library being repaired whether part succeeds.If it is not, then entering
Step S504, if so, entering step S505.
Step S504:Whether Test database 102 is damaged.
Step S504 is identical as above-mentioned steps S201, other steps and above-described embodiment of the present embodiment after step S504
It is identical, it does not repeat here.
Specifically, database 102 and data in system file 103 or file is deposited in the form of data record
In database 102, the part that is repaired in file part insertion of data into data library 102 is first by file part by the present embodiment
Upper a data record is inserted into database 102, and judges whether data record is inserted into success, if success, carries out next
The insertion of data record, if unsuccessful, whether Test database 102 is damaged again.
Step S505:Terminate data update.
Certainly, if Test database 102 is damaged again, the restoration information by the table damaged is needed to revert to this
Preprosthetic restoration information abandons this reparation.
It being different from the prior art, the data of the database 102 of the present embodiment private clound equipment 101 are derived from file system 103,
File system 103 can be repaired part for database 102 and provide Backup Data, therefore, be obtained using from file system 103
The mode for the part that data update database 102 is repaired can realize the reparation to the database 102 of private clound equipment 101,
So as to ensure that private clound equipment 101 normally accesses file system 103 by database 102, therefore file system can be improved
The access efficiency of system 103.
The application proposes the restorative procedure of the database of second embodiment.The method of the present embodiment and the side of above-described embodiment
Method difference lies in:The method of the present embodiment further comprises before the step S201 of above-described embodiment:Judge whether to detect
Operation failure to database 102 instructs, if so, S201 is entered step, if it is not, not doing any operation then.
Wherein, the present embodiment includes at least the operation of database 102:The data of file system 103 are synchronized to number
According to library 102, access to database 102 and any one of turn-on data library 102.Certainly, in other embodiments, logarithm
Can also include other operations according to the operation in library, for example, closing database.
It, can be to the processor of private clound equipment 101 when 102 operation failure of database in the working mechanism of database 102
Operation failure is reported to instruct, processor carries out next step operation after receiving operation failure instruction.
In an application scenarios, when accessing failure to database 102, it can use self-defined in expanding library ars.so
Interface ars_module is instructed as operation failure, is reported to processor;The data of file system 103 are being synchronized to database
When 102 failure, self defined interface msg_to_tmbservice in expanding library libarssystem.so can be used to be used as operation
Failure command is reported to processor, after detecting that database 102 can be used, then the data of file system 103 is synchronized to database
102。
To improve the data of private clound equipment 101 or the safety of file, private clound equipment 101 passes through database 102
It can access, and the data of file system 103 cannot be updated, private clound equipment 101 to the data of file system 103
Need to carry out data update by file system 103 itself, at the same for ease of database 102 to the data of file system 103 more
Accurate effective management, needs 103 newer data of file system being synchronized in database 102.
The data of file system 103 are synchronized to database 102, are accessed to database 102 and turn-on data library 102
Equal operation failures are likely to be caused by because database 102 is damaged.
During database 102 is repaired, the accident power-off or soft-off of private clound equipment 101 are likely to cause
Database 102 is damaged, and to further increase the access efficiency of file system 103, the application is it is further proposed that 3rd embodiment
Private clound device databases restorative procedure, as shown in fig. 6, the method for the present embodiment may be implemented in private clound equipment 101
The reparation state in automatic data-detection library 102 when database 102 starts, to continue to complete preceding primary unfinished reparation task.
The method of the present embodiment further comprises step S601- steps S604 on the basis of the method for above-described embodiment.
Step S601:When detecting that the unlatching of database 102 successfully instructs, the table restoration information of database 102 is obtained.
Step S602:The reparation state of database 102 is obtained from table restoration information.
The reparation state of database 102 described in the present embodiment refers to the reparation state of each tables of data in database 102.
Step S603:Judge whether reparation state is to have repaired.If it is not, S202 is then entered step, if so, entering step
S604。
Step S604:Termination detection.
Judge whether the reparation state of each tables of data in database 102 is to have repaired respectively.If the reparation of tables of data
State is to have repaired, then database of descriptions 102 has been completed the reparation of all tables of data in last time reparation task, then not
It needs to do any reparation operation to database 102, if it is other states to have the reparation state of tables of data, such as does not repair or start
It repairs, all last time of database of descriptions 102 repair task and do not complete also, and therefore, it is necessary to continue to repair database 102.
The application it is further proposed that the private clound device databases of fourth embodiment restorative procedure.The method of the present embodiment
Further comprise on the basis of the method for above-described embodiment:Database 102 is carried out in repair process, if detecting data
The out code in library 102 then interrupts the operation to database 102, and closes database 102.It can reduce in this way
Database 102 is damaged, the probability of loss of data.
In an application scenarios, in the soft-off of private clound equipment 101, the first notification database 102 of meeting is closed, and is being located
Before managing device execution soft-off, beforeshutdown.sh scripts are first run, wherein beforeshutdown.sh scripts, which have, to close
It closes and the relevant application of database 102, preservation data or file and the function of closing database 102;Then halt orders are executed,
Realize soft-off.
After the embodiment of the present application completes database repair, database can be operated by being spaced preset time
To judge whether database can be used.
Optionally, the embodiment of the present application further uses message notification mechanism, other application that can pass through the message informing
Mechanism knows that data repair state of a process, for example, it was discovered that the tables of data damaged is being repaired, the database of repeated trigger is repaiied
Multiple process can close the connection with processor, if the connection closed, notify the database repair process phase with the repeated trigger
The application of pass can carry out further work.
The application is it is further proposed that a kind of private clound equipment, as shown in fig. 7, Fig. 7 is another reality of the application private clound equipment
Apply the structural schematic diagram of example.The present embodiment private clound equipment 701 is equipped with database and file system, and database can be used as text
The access window of part system, user can by database in file system data or file access.The present embodiment
Private clound equipment 701 includes processor 702 and memory 703, wherein whether processor 702 is damaged for Test database;
If database is damaged, processor 702 repairs database;Processor 702 is used in the reparation for detecting database
When completion, the file part of database being repaired in the file system corresponding to part is determined;Processor 702 is for obtaining
Database be damaged before file part data, and the file part data update before database is damaged is to its corresponding number
It is repaired part according to library;The data of memory 703 data and file system in library for storing data.
The processor 702 of the present embodiment is additionally operable to the method for realizing above method embodiment, does not repeat here.
It is different from the prior art, the data of the database of the present embodiment private clound equipment 701 are derived from file system, file system
System can be repaired part for database and provide Backup Data, therefore, using the acquisition data update database from file system
The mode for the part being repaired can realize the reparation of the database to private clound equipment, so as to ensure private clound equipment
File system is normally accessed by database, therefore the access efficiency of file system can be improved.
The application is it is further proposed that a kind of device with store function, as shown in figure 8, Fig. 8, which is the application, has storage
The structural schematic diagram of one embodiment of device of function.The present embodiment has the device 801 of store function for storing above-mentioned implementation
Example related data 802 and program data 803, wherein related data 802 include at least above-mentioned database data or file,
The data or file of file system.Related data 802 and program data 803 have carried out in above method embodiment detailed
Narration, does not repeat here.
There is the present embodiment the device 801 of store function can be, but not limited to, USB flash disk, SD card, PD CD-ROM drives, movement firmly
Disk, large capacity floppy drive, flash memory, multimedia memory card, server etc..
It is different from the prior art, the embodiment of the present application can show audio signal using the otherness size of background picture
The size of intensity or frequency, so as to promoted terminal plays audio signal dynamic visual impact.
If in addition, above-mentioned function is realized in the form of software function and sells or in use, can deposit as stand-alone product
Storage is in a mobile terminal read/write memory medium, that is, and the application also provides a kind of storage device for the data that have program stored therein,
Described program data can be performed the method to realize above-described embodiment, which can be such as USB flash disk, CD, service
Device etc..That is, the application can be expressed in the form of software products comprising some instructions are used so that an intelligence
Energy terminal executes all or part of step of each embodiment the method.
In the description of the present application, reference term " one embodiment ", " some embodiments ", " example ", " specific example ",
Or the description of " some examples " etc. means particular features, structures, materials, or characteristics packet described in conjunction with this embodiment or example
In at least one embodiment or example contained in the application.In the present specification, schematic expression of the above terms are necessarily
It is directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be at any one
Or it can be combined in any suitable manner in multiple embodiments or example.In addition, without conflicting with each other, those skilled in the art
Member the feature of different embodiments or examples described in this specification and different embodiments or examples can be combined and
Combination.
In addition, term " first ", " second " are used for description purposes only, it is not understood to indicate or imply relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discuss suitable
Sequence, include according to involved function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be by the application
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (can be personal computer, server, the network equipment or other can be from instruction execution
System, device or equipment instruction fetch and the system executed instruction) it uses, or combine these instruction execution systems, device or equipment
And it uses.For the purpose of this specification, " computer-readable medium " can be it is any can include, store, communicate, propagate, or transport
Program is for instruction execution system, device or equipment or the device used in conjunction with these instruction execution systems, device or equipment.
The more specific example (non-exhaustive list) of computer-readable medium includes following:Electrical connection with one or more wiring
Portion's (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM) can
Wipe editable read-only memory (EPROM or flash memory), fiber device and portable optic disk read-only storage
(CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other suitable Jie
Matter, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with other
Suitable method is handled electronically to obtain described program, is then stored in computer storage.
The foregoing is merely presently filed embodiments, are not intended to limit the scope of the claims of the application, every to utilize this
Equivalent structure or equivalent flow shift made by application specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field includes similarly in the scope of patent protection of the application.
Claims (10)
1. a kind of restorative procedure of private clound device databases, which is characterized in that the private clound equipment passes through the database
It accesses to file system, the restorative procedure includes:
Detect whether the database is damaged;
If the database is damaged, the database is repaired;
When the reparation for detecting the database is completed, the file of the database being repaired corresponding to part is determined
File part in system;
Obtain the file part data before the database is damaged;
The file part data update before the database is damaged is repaired portion to its corresponding database
Point.
2. restorative procedure according to claim 1, which is characterized in that whether be damaged it in the detection database
Before include:Judge whether to detect that the operation failure instruction of the database executes the detection data if detecting
The whether impaired step in library;
Wherein, the operation of the database is included at least:The data of the file system are synchronized to the database, to institute
It states database and accesses and open any one of described database.
3. restorative procedure according to claim 1, which is characterized in that it is described the database is repaired before wrap
It includes:
When detecting that the unlatching of the database successfully instructs, the table restoration information of the database is obtained;
The reparation state of the database is obtained from the table restoration information;
Judge whether the reparation state is to have repaired;
If it is not, then executing the step of being repaired to the database.
4. restorative procedure according to claim 1, which is characterized in that it is described to the database carry out repair include:
The database is carried out in repair process, if detecting the out code of the database, interrupting to the data
The operation in library, and close the database.
5. restorative procedure according to claim 1, which is characterized in that it is described to the database carry out repair include:
Obtain the table restoration information of the database and the table information for having damaged tables of data of the database, wherein the table
Restoration information includes at least the restoration information of table information and the part tables of data of the tables of data of the database;
Judge whether the table restoration information includes restoration information corresponding with the table information for having damaged tables of data, wherein
The corresponding restoration information of table information for having damaged tables of data includes at least the reparation state for having damaged tables of data;
If the table restoration information include restoration information corresponding with the table information for having damaged tables of data, from it is described
It damages in the corresponding restoration information of table information of tables of data and has damaged the reparation state of tables of data described in obtaining, and described in judgement
Whether the reparation state for damaging tables of data is to have repaired;
If it is not, then being repaired to the tables of data of having damaged;
If the table restoration information do not include restoration information corresponding with the table information for having damaged tables of data, generate described in
The restoration information of tables of data has been damaged, and the reparation state for having damaged tables of data is updated to start to repair, and to described
Tables of data has been damaged to be repaired;
When detecting that instruction is completed in the reparation for having damaged tables of data, the reparation state for having damaged tables of data is updated
To have repaired.
6. restorative procedure according to claim 5, which is characterized in that the table information for having damaged tables of data is further wrapped
The type for having damaged tables of data is included, includes after the table information for having damaged tables of data for obtaining the database:
Damage whether tables of data is repairing according to described in the table information judgement for having damaged tables of data;
If it is not, having damaged the type of tables of data described in then being obtained from the table information;
Damage whether the type of tables of data is file type described in judging;
Judge the table restoration information whether comprising corresponding with the table information for having damaged tables of data if so, execution is described
The step of restoration information;
It is described to it is described damaged tables of data carry out repair include:
The broken parts of tables of data have been damaged described in deleting.
7. restorative procedure according to claim 1, which is characterized in that it is described the database is damaged before the text
The part that is repaired that part partial data is updated to its corresponding database includes:
Judge the file part data before the database is damaged whether in the database;
If it is not, being then repaired part by what the file part data were inserted into the database.
8. restorative procedure according to claim 7, which is characterized in that it is described will the file part data be inserted into described in
The part that is repaired of database further comprises later:
Judge it is described by the file part data be inserted into the database be repaired part whether succeed;
If it is not, then executing the detection whether impaired step of database again.
9. a kind of private clound equipment, which is characterized in that the private clound equipment visits file system by the database
It asks, the private clound equipment includes:
Processor, the processor is for detecting whether the database is damaged;If the database is damaged, the place
Reason device repairs the database;The processor is used to, when the reparation for detecting the database is completed, determine institute
State the file part of database being repaired in the file system corresponding to part;The processor is for obtaining described
Database be damaged before the file part data, and the file part data update before the database is damaged
It is repaired part to its corresponding database;
Memory is coupled with the processor, and the memory is for storing the data of the database and the file system
Data.
10. a kind of device with store function, is stored thereon with program data, which is characterized in that described program data are held
The step in any one of claim 1-8 the methods is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810144886.5A CN108459925B (en) | 2018-02-10 | 2018-02-10 | Private cloud equipment, database repairing method thereof and device with storage function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810144886.5A CN108459925B (en) | 2018-02-10 | 2018-02-10 | Private cloud equipment, database repairing method thereof and device with storage function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108459925A true CN108459925A (en) | 2018-08-28 |
CN108459925B CN108459925B (en) | 2022-05-31 |
Family
ID=63216991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810144886.5A Expired - Fee Related CN108459925B (en) | 2018-02-10 | 2018-02-10 | Private cloud equipment, database repairing method thereof and device with storage function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108459925B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111445931A (en) * | 2020-03-11 | 2020-07-24 | 慧镕电子***工程股份有限公司 | Data recovery method and device for solid state disk |
CN116737467A (en) * | 2023-08-15 | 2023-09-12 | 金篆信科有限责任公司 | Method, device, system and medium for automatic detection and repair of database |
Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6374264B1 (en) * | 1998-09-04 | 2002-04-16 | Lucent Technologies Inc. | Method and apparatus for detecting and recovering from data corruption of a database via read prechecking and deferred maintenance of codewords |
CN1517906A (en) * | 2003-01-14 | 2004-08-04 | 联想(北京)有限公司 | Document system and document management method |
CN101604335A (en) * | 2004-05-03 | 2009-12-16 | 微软公司 | The system and method that is used for automated data library or file system maintenance and reparation |
CN102867029A (en) * | 2012-08-27 | 2013-01-09 | 浪潮(北京)电子信息产业有限公司 | Method for managing catalogue of distributed file system and distributed file system |
CN102981830A (en) * | 2012-11-02 | 2013-03-20 | 北京航空航天大学 | Configurable method for file fast recognition and damaged file intelligent repair |
CN103095720A (en) * | 2013-01-30 | 2013-05-08 | 中国科学院自动化研究所 | Safety management method of cloud memory system based on session management server |
CN103226592A (en) * | 2013-04-15 | 2013-07-31 | 浪潮(北京)电子信息产业有限公司 | Database-based file system and file storage method |
CN103279575A (en) * | 2013-06-20 | 2013-09-04 | 福建伊时代信息科技股份有限公司 | Method and device for processing file information |
CN103914354A (en) * | 2012-12-31 | 2014-07-09 | 北京新媒传信科技有限公司 | Method and system for database fault recovery |
CN104182418A (en) * | 2013-05-27 | 2014-12-03 | 阿里巴巴集团控股有限公司 | Method and device for obtaining node metadata |
CN105573859A (en) * | 2014-10-15 | 2016-05-11 | 中兴通讯股份有限公司 | Data recovery method and device of database |
CN106469098A (en) * | 2016-09-19 | 2017-03-01 | 广州日滨科技发展有限公司 | A kind of fault handling method of equipment and device |
CN107092685A (en) * | 2017-04-24 | 2017-08-25 | 广州新盛通科技有限公司 | A kind of method that file system and RDBMS store transaction data are used in combination |
CN107193871A (en) * | 2017-04-12 | 2017-09-22 | 腾讯科技(深圳)有限公司 | Database recovering method and device |
US9804935B1 (en) * | 2015-01-26 | 2017-10-31 | Intel Corporation | Methods for repairing a corrupted database to a new, correct state by selectively using redo and undo operations |
CN107391107A (en) * | 2017-06-12 | 2017-11-24 | 北京明朝万达科技股份有限公司 | The restorative procedure and device of a kind of application program |
CN107402843A (en) * | 2017-06-19 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Restoration methods, device and the equipment of database corruption |
CN107515801A (en) * | 2017-09-13 | 2017-12-26 | 绿金在线电子商务有限公司 | A kind of data self-repairing method based on relevant database |
-
2018
- 2018-02-10 CN CN201810144886.5A patent/CN108459925B/en not_active Expired - Fee Related
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6374264B1 (en) * | 1998-09-04 | 2002-04-16 | Lucent Technologies Inc. | Method and apparatus for detecting and recovering from data corruption of a database via read prechecking and deferred maintenance of codewords |
CN1517906A (en) * | 2003-01-14 | 2004-08-04 | 联想(北京)有限公司 | Document system and document management method |
CN101604335A (en) * | 2004-05-03 | 2009-12-16 | 微软公司 | The system and method that is used for automated data library or file system maintenance and reparation |
CN102867029A (en) * | 2012-08-27 | 2013-01-09 | 浪潮(北京)电子信息产业有限公司 | Method for managing catalogue of distributed file system and distributed file system |
CN102981830A (en) * | 2012-11-02 | 2013-03-20 | 北京航空航天大学 | Configurable method for file fast recognition and damaged file intelligent repair |
CN103914354A (en) * | 2012-12-31 | 2014-07-09 | 北京新媒传信科技有限公司 | Method and system for database fault recovery |
CN103095720A (en) * | 2013-01-30 | 2013-05-08 | 中国科学院自动化研究所 | Safety management method of cloud memory system based on session management server |
CN103226592A (en) * | 2013-04-15 | 2013-07-31 | 浪潮(北京)电子信息产业有限公司 | Database-based file system and file storage method |
CN104182418A (en) * | 2013-05-27 | 2014-12-03 | 阿里巴巴集团控股有限公司 | Method and device for obtaining node metadata |
CN103279575A (en) * | 2013-06-20 | 2013-09-04 | 福建伊时代信息科技股份有限公司 | Method and device for processing file information |
CN105573859A (en) * | 2014-10-15 | 2016-05-11 | 中兴通讯股份有限公司 | Data recovery method and device of database |
US9804935B1 (en) * | 2015-01-26 | 2017-10-31 | Intel Corporation | Methods for repairing a corrupted database to a new, correct state by selectively using redo and undo operations |
CN106469098A (en) * | 2016-09-19 | 2017-03-01 | 广州日滨科技发展有限公司 | A kind of fault handling method of equipment and device |
CN107193871A (en) * | 2017-04-12 | 2017-09-22 | 腾讯科技(深圳)有限公司 | Database recovering method and device |
CN107092685A (en) * | 2017-04-24 | 2017-08-25 | 广州新盛通科技有限公司 | A kind of method that file system and RDBMS store transaction data are used in combination |
CN107391107A (en) * | 2017-06-12 | 2017-11-24 | 北京明朝万达科技股份有限公司 | The restorative procedure and device of a kind of application program |
CN107402843A (en) * | 2017-06-19 | 2017-11-28 | 阿里巴巴集团控股有限公司 | Restoration methods, device and the equipment of database corruption |
CN107515801A (en) * | 2017-09-13 | 2017-12-26 | 绿金在线电子商务有限公司 | A kind of data self-repairing method based on relevant database |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111445931A (en) * | 2020-03-11 | 2020-07-24 | 慧镕电子***工程股份有限公司 | Data recovery method and device for solid state disk |
CN116737467A (en) * | 2023-08-15 | 2023-09-12 | 金篆信科有限责任公司 | Method, device, system and medium for automatic detection and repair of database |
Also Published As
Publication number | Publication date |
---|---|
CN108459925B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8566282B2 (en) | Creating a buffer point-in-time copy relationship for a point-in-time copy function executed to create a point-in-time copy relationship | |
CN107391269B (en) | Method and equipment for processing message through persistent queue | |
CN108460045B (en) | Snapshot processing method and distributed block storage system | |
CN109325016B (en) | Data migration method, device, medium and electronic equipment | |
CN107315814B (en) | Method and system for verifying data consistency after data migration of KDB (KDB) database | |
US11176110B2 (en) | Data updating method and device for a distributed database system | |
CN101763301B (en) | System and method for testing a boot image | |
CN110008129B (en) | Reliability test method, device and equipment for storage timing snapshot | |
CN105824846B (en) | Data migration method and device | |
CN110888837B (en) | Object storage small file merging method and device | |
CN111309524A (en) | Distributed storage system fault recovery method, device, terminal and storage medium | |
CN109684298A (en) | Database migration method, apparatus, equipment and storage medium | |
CN108427728A (en) | Management method, equipment and the computer-readable medium of metadata | |
CN106557278A (en) | A kind of method of data cached persistence | |
CN108459925A (en) | The restorative procedure of private clound equipment and its database, the device with store function | |
WO2015087509A1 (en) | State storage and restoration device, state storage and restoration method, and storage medium | |
CN105574026A (en) | Method and device for service supporting by using non-relational database | |
CN108271420A (en) | Manage method, file system and the server system of file | |
CN103761156A (en) | Online repair method aimed at file system | |
KR100501414B1 (en) | Method of and apparatus for logging and restoring the meta data in file system | |
CN115454958A (en) | Data processing method, device, equipment, system and medium based on artificial intelligence | |
KR20190113359A (en) | Data storing and restoring method based on In-memory database using NVDIMM | |
KR102123616B1 (en) | Method and apparatus for parallel journaling using conflict page list | |
CN107491363A (en) | A kind of Snapshot Method and device of the storage volume based on linux kernel | |
CN103593219B (en) | A kind of quick start method of the highly reliable file system for NAND FLASH device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20220531 |