CN102841827A - Method for backuping database files and communication terminal - Google Patents
Method for backuping database files and communication terminal Download PDFInfo
- Publication number
- CN102841827A CN102841827A CN201210217423XA CN201210217423A CN102841827A CN 102841827 A CN102841827 A CN 102841827A CN 201210217423X A CN201210217423X A CN 201210217423XA CN 201210217423 A CN201210217423 A CN 201210217423A CN 102841827 A CN102841827 A CN 102841827A
- Authority
- CN
- China
- Prior art keywords
- backup
- database
- database file
- file
- communication terminal
- 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
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention is applicable to the technical field of communication, and provides a method for backuping database files. The method comprises the steps that: after the backup command of a database file is received, a communication terminal is detected to be in an idle state or not; if in the idle state, the database file is backed up; during the backuping process of the database file, the communication terminal is detected to be in the idle state or not; and if still in the idle state, the database file is continuously backed up till completion, and otherwise, the database file is stopped backuping. Correspondingly, the invention further provides the communication terminal. Consequently, the backup is determined to execute or not according to the current operation state through the communication terminal, not only can the backup efficiency of the database files be increased, but also the normal working of the communication terminal can be prevented from being influenced.
Description
Technical field
The present invention relates to communication technical field, relate in particular to a kind of backup method and communication terminal of database file.
Background technology
In communication terminal, wide area information server files such as address list, communications records are very important as far as the user, in case these database files are lost or damaged, will cause very big puzzlement to the user.Therefore, the existing communication terminal provides the backup functionality of database file, can select sometime (with developer's experience or user's use experience) that the significant data library file in the communication terminal is carried out the backstage backup; When finding that database file damages, then carry out recovery operation, to avoid the database file loss with database file corresponding in the backup.But also there is following defective in the available data library backup:
One, when carrying out the backup of database file, can not go to consider the running status of communication terminal, possibly cause that the user can't normally use communication terminal in data backup, even can't wake communication terminal up;
Two, in order not influence the operate as normal of communication terminal, the BACKUP TIME of database file is chosen in night usually, causes the database file of the communication terminal of shutdown at night can't obtain backup;
Three, when carrying out the backup of database file, all directly carry out data and duplicate, possibly cause having backed up impaired database file;
Four, when carrying out the backup of database file, if the backup procedure accident stops, perhaps the backed up data library file is unavailable slowly possibly to cause backup rate;
Five, when carrying out the backup of database file, do not consider the authority problem, possibly cause some database file successfully to back up.
Can know that to sum up the redundancy technique of available data library file obviously exists inconvenience and defective, so be necessary to improve on reality is used.
Summary of the invention
To above-mentioned defective; The object of the present invention is to provide a kind of backup method and communication terminal of database file; It can determine whether carrying out backup according to the current running status of communication terminal; Not only can improve the backup efficient of database file, and can avoid influencing the operate as normal of communication terminal.
To achieve these goals, the present invention provides a kind of backup method of database file, comprises that step has:
After receiving the backup instruction of database file, detect communication terminal and whether be in idle condition;
If be in said idle condition, then carry out the backup of said database file;
In the backup procedure of said database file, detect said communication terminal and whether still be in idle condition;
If still be in said idle condition, the backup of then proceeding said database file is until completion, otherwise stops the backup of said database file.
According to backup method of the present invention, the said step of the backup instruction of database file of receiving also comprises before:
After receiving the screen broadcasting instructions that goes out, detect said communication terminal and whether be in idle condition;
If be in said idle condition, set the backup reference time of backup next time;
When said backup arrives reference time, trigger and broadcast the said backup instruction of said database file.
According to backup method of the present invention, also comprise:
Set up backup directory, and the access limit of open said backup directory;
Said step of carrying out the backup of said database file also comprises:
Judgement should be with whether having the backup authority of said database file;
If have said backup authority, then directly said database file is backuped to said backup directory;
If do not have said backup authority, then send and be broadcast to object with backup authority, notify said object that said database file is backuped to said backup directory.
According to backup method of the present invention, said step of carrying out the backup of said database file also comprises:
Judge whether to be in predetermined time out section;
If be in said time out section, then suspend the backup of said database file, and discharge control central processing unit.
According to backup method of the present invention, said step of carrying out the backup of said database file also comprises:
The former database file that needs backup in the coping database, and the said former database file that has duplicated is carried out rename generate the first corresponding database temporary file;
Said in the backup procedure of database file, detect the step whether said communication terminal still be in idle condition and comprise:
In the reproduction process of said database file, detect and whether receive the bright screen broadcasting instructions;
Said if still be in idle condition, the backup of then proceeding said database file is until completion, otherwise the step that stops the backup of said database file comprises:
If receive said bright screen broadcasting instructions, then stop to duplicate said former database file, and delete the said first database temporary file;
If do not receive said bright screen broadcasting instructions, then proceed duplicating of said former database file until completion;
This former database file detects and whether can open the said first database temporary file after accomplishing and duplicating;
If can open the said first database temporary file, then the said first database temporary file is carried out rename and generate corresponding Backup Data library file;
If can not open the said first database temporary file, then delete the said first database temporary file.
The present invention also provides a kind of communication terminal, includes:
First detection module after being used to receive the backup instruction of database file, detects communication terminal and whether is in idle condition;
Backup module is used for when said first detection module detects said communication terminal and is in said idle condition, carrying out the backup of said database file;
Second detection module is used for the backup procedure at said database file, detects said communication terminal and whether still is in idle condition;
Said backup module also is used for when said second detection module detects said communication terminal and still is in said idle condition, and the backup of proceeding said database file is until completion, otherwise stops the backup of said database file.
According to communication terminal of the present invention, said communication terminal also comprises:
The 3rd detection module, be used to receive go out the screen broadcasting instructions after, detect said communication terminal and whether be in idle condition;
The time set module is used for when said the 3rd detection module detects said communication terminal and is in said idle condition, sets the backup reference time of backup next time;
The instruction triggers module is used for when said backup arrives reference time, triggering and broadcast the said backup instruction of said database file.
According to communication terminal of the present invention, said communication terminal also comprises:
Catalogue is set up module, is used to set up backup directory, and the access limit of open said backup directory;
The authority judge module is used for when said first detection module detects said communication terminal and is in said idle condition, judging whether said backup module has the backup authority of said database file;
When said backup module also is used to have said backup authority, directly said database file is backuped to said backup directory; And when being used for not having said backup authority, sending and be broadcast to the object with backup authority, notify said object that said database file is backuped to said backup directory.
According to communication terminal of the present invention, said backup module also comprises:
Judge submodule, be used to judge whether to be in predetermined time out section;
Suspend submodule, when being used to be in said time out section, suspending the backup of said database file, and discharge control central processing unit.
According to communication terminal of the present invention, said backup module also comprises the replicon module and stops submodule;
Said replicon module is used for the former database file that the coping database needs back up, and the said former database file that has duplicated is carried out the first database temporary file that rename generates correspondence;
Said second detection module also is used for the reproduction process at said database file, detects and whether receives the bright screen broadcasting instructions;
The said submodule that stops when being used to receive said bright screen broadcasting instructions, stopping to duplicate said former database file, and deletes the said first database temporary file;
When said replicon module also is used for not receiving said bright screen broadcasting instructions, then proceed duplicating of said former database file, and the said first database temporary file is carried out rename generate corresponding backup data files until completion.
The present invention detects communication terminal and whether is in idle condition after receiving the backup instruction of database file, only is in the back-up job that idle condition is just understood the log-on data library file; And in the backup procedure of database file, further detect communication terminal and whether still be in idle condition,, then continue backup procedure until completion, otherwise stop the backup of database file if still be in idle condition; If the critical data storehouse is damaged in the communication terminal in the future, the available library file of backed up data carries out restoring operation, to avoid information loss.Whereby, the present invention can determine whether according to the current running status of communication terminal starting and continuing backup, not only can improve the backup efficient of database file, and can avoid the influence of backup operation to the operate as normal of communication terminal.Secondly, the present invention has increased the operation of the authority judgement of open backup directory authority and backup side, can can't not carry out because of the authority problem to guarantee backup operation.In addition, the present invention is through introducing the database temporary file, the relative velocity that can accelerate to back up, further simultaneously consistance and the integrality that guarantees database file in backup procedure; In addition, the present invention has also increased the decision operation of opening to the database temporary file, to avoid backing up the database file that has damaged, to guarantee the availability of Backup Data library file.
Description of drawings
Fig. 1 is the structural representation of communication terminal of the present invention;
Fig. 2 is the structural representation at preferred communication of the present invention terminal;
Fig. 3 is the structural representation of the recovery module at preferred communication of the present invention terminal;
Fig. 4 is the process flow diagram of the backup method of database file of the present invention;
Fig. 5 is the process flow diagram of the backup method of database file in the first embodiment of the invention;
Fig. 6 is the process flow diagram of the backup method of database file in the second embodiment of the invention;
Fig. 7 is the flow instance figure that triggers backup instruction in the backup method of the present invention; And
Fig. 8 is the flow instance figure of the method for reducing of database file of the present invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Fig. 1 is the structural representation of communication terminal of the present invention; Said communication terminal 100 can be mobile phone, PDA (Personal Digital Assistant; Personal digital assistant), panel computer etc.; And communication terminal 100 includes first detection module 10, backup module 20 and second detection module 30, wherein:
Said first detection module 10 after being used to receive the backup instruction of database file, detects communication terminal 100 and whether is in idle condition.
Said backup module 20 is used for when first detection module 10 detects communication terminal 100 and is in idle condition, carrying out the backup of database file.Backup module 20 be used for backup database predetermined need the backed up data library file; For example important contacts.db etc.; Can need the backed up data library file by system default setting, can certainly come the self-defined backed up data library file that needs by the user.
Said second detection module 30 is used for the backup procedure at database file, detects communication terminal 100 and whether still is in idle condition.
Said backup module 20 also is used for when second detection module 30 detects communication terminal 100 and still is in idle condition, and the backup of proceeding database file is until completion, otherwise stops the backup of database file.
The present invention is before the backup of database file starts and among the backup procedure; Need guarantee that all communication terminal 100 is in idle condition; Whether start and continue backup with decision; Not only can improve the backup efficient of database file, and can avoid the influence of backup operation the operate as normal of communication terminal 100.Whether communication terminal 100 is in idle condition; After can being in the screen state a period of time of going out at the screen of communication terminal 100; Again the running status of communication terminal 100 is detected and judge; The idle condition here can be confirmed voluntarily according to specific circumstances, mainly comprise the screen state that goes out, network state, communications status, CPU (Central Processing Unit, central processing unit) state etc.; And screen to be in the screen state that goes out be the important restrictions condition that backup procedure carries out under idle condition, and in operating process, can come to realize easily through reception to the bright screen broadcasting and the screen broadcasting of going out.Preferably, the backup procedure of database file of the present invention uses background thread to carry out, and preventing to use perhaps, the main thread of Provider (provider) blocks.Be more preferably; The present invention is arranged on non-backup at night, but owing to do not know when the user can use communication terminal 100, can be with treating that the backed up data library file is divided into several small documents; Use piecemeal and the continuous mode that passes, can reduce the probability that is stopped among the backup procedure.
Fig. 2 is the structural representation at preferred communication of the present invention terminal; Said communication terminal 100 can include first detection module 10, backup module 20, second detection module 30, the 3rd detection module 40, time set module 50, instruction triggers module 60, catalogue is set up module 70, authority judge module 80 and/or recovery module 90, wherein:
Said the 3rd detection module 40 is used to receive and goes out behind the screen broadcasting instructions, detects communication terminal 100 and whether is in idle condition.
Said time set module 50 is used for when the 3rd detection module 40 detects communication terminal 100 and is in idle condition, sets the backup reference time of backup next time.The present invention preferably sets the reference time of set time as backup, preferably be selected in and cause and can't back up to avoid the user to shut down evening daytime, for example every day 16:00.
Said instruction triggers module 60 is used for when backup arrives reference time, triggers and the backup instruction of broadcast data library file.
Said first detection module 10 after being used to receive the backup instruction of database file, detects communication terminal 100 and whether is in idle condition.
Said catalogue is set up module 70, is used to set up backup directory, and the access limit of open backup directory, makes backup directory at will to read and write.
Said authority judge module 80 is used for when first detection module 10 detects communication terminal 100 and is in idle condition, judging whether backup module 20 has the backup authority of database file.
Said backup module 20 when being used to have the backup authority, directly backups to backup directory with database file; And be used for not having backup during authority, and send and be broadcast to object with backup authority, application or the provider of backup authority etc. are for example arranged, notify said object that database file is backuped to backup directory.
The present invention has increased the operation of the authority judgement of open backup directory authority and backup side, can can't not carry out because of the authority problem to guarantee backup operation.
Said backup module 20 also comprises:
Suspend submodule 22, when being used to be in the time out section, suspend the backup of database file, and discharge control CPU.Through asking that the type of having a rest discharges the CPU control, can prevent that backup procedure from taking that CPU too highly causes that operation is slow, standby calls out problem such as do not wake up.Release suspends backup after the control of CPU, if the time out section after the past, with the control of recovering automatically CPU, and continues backup on the former again basis.
Said backup module 20 also comprises replicon module 23 and stops submodule 24, wherein:
The present invention is through introducing the database temporary file, the relative velocity that can accelerate to back up, further simultaneously consistance and the integrality that guarantees database file in backup procedure; But the present invention adds the suffix name when the Backup Data library file; Generate the database temporary file; When database file has all duplicated; The suffix name of delete database temporary file just can obtain formal Backup Data library file rapidly, and it is very fast that said here relative velocity is meant that soon the suffix name of revising the database temporary file becomes the speed of formal this process of database file.In addition, the present invention has also increased the decision operation of opening to the database temporary file, to avoid backing up the database file that has damaged, to guarantee the availability of Backup Data library file.
Fig. 3 is the structural representation of the recovery module at preferred communication of the present invention terminal, and said recovery module 90 comprises deletion submodule 91, reduction copying submodule 92, the first rename submodule 93 and/or the second rename submodule 94, wherein:
Said deletion submodule 91 after being used to receive the reduction instruction of database file, is deleted the said former database file that needs reduction in the said database.When database is damaged, the reduction instruction of the direct trigger data library file of meeting.
Said reduction copying submodule 92 is used to duplicate the said Backup Data library file corresponding with said former database file.
The said first rename submodule 93 is used for that the said Backup Data library file that has duplicated is carried out rename and forms the second corresponding database temporary file.
The said second rename submodule 94 is used for that the said second database temporary file is carried out rename and forms corresponding new database file, so far accomplishes the reduction process of database file.
For example, when the user uses application, when visiting this database damage of database discovery of this application, delete the legacy data storehouse earlier, the corresponding data library file that will back up then duplicates reduction from backup directory.Because reduction process is by Event triggered; And require to carry out immediately, so flow process is fairly simple, but same adopt generate earlier the database temporary file again the method for rename carry out; With this relative velocity of accelerating to back up, and the consistance and the integrality of assurance database file.The processing mode of reduction process is included in the method for backup procedure, and is consistent with the processing mode of duplicating to authority, repeats no more here.
Fig. 4 is the process flow diagram of the backup method of database file of the present invention, and it can pass through to realize like Fig. 1 or communication terminal 100 shown in Figure 2, comprise that step has:
Step S401 receives the backup instruction of database file.
Step S402 detects communication terminal 100 and whether is in idle condition, if execution in step S404 then, otherwise execution in step S403.Whether communication terminal 100 is in idle condition; Can be after communication terminal 100 be in the screen state a period of time of going out; Detect through running status and to judge communication terminal 100; The idle condition here can be confirmed voluntarily according to specific circumstances, mainly comprise the screen state that goes out, network state, communications status, CPU state etc.
Step S403, if be in busy state, process ends then, backup that promptly can the log-on data library file.
Step S404 if be in idle condition, then carries out the backup of database file.The predetermined backed up data library file that needs in the backup database can need the backed up data library file by system default setting in this step, can certainly come the self-defined backed up data library file that needs by the user.
Step S405 in the backup procedure of database file, detects communication terminal 100 and whether still is in idle condition, if execution in step S406 then, otherwise execution in step S407.It is the important restrictions condition that backup procedure carries out under idle condition that screen is in the screen state that goes out, and in operating process, can come to realize easily through the reception to the bright screen broadcasting and the screen broadcasting of going out.
Step S406, if still be in idle condition, the backup of then proceeding database file is until completion.
Step S407 if be not in idle condition, then stops the backup of database file.
Fig. 5 is the process flow diagram of the backup method of database file in the first embodiment of the invention, and it can be realized through communication terminal as shown in Figure 2 100, comprise that step has:
Step S501 receives the screen broadcasting instructions that goes out.
Step S502 detects communication terminal 100 and whether is in idle condition, if execution in step S504 then, otherwise execution in step S503.
Step S503 is if be in busy state, process ends.
Step S504 if be in idle condition, sets the backup reference time of backup next time.The present invention preferably sets the reference time of set time as backup, preferably be selected in and cause and can't back up to avoid the user to shut down evening daytime, for example every day 16:00.
Step S505 when backup arrives reference time, triggers and the backup instruction of broadcast data library file.
Step S506 detects communication terminal 100 and whether is in idle condition, if execution in step S507 then, otherwise return step S503.
Step S507 sets up backup directory, and the access limit of open backup directory, makes backup directory at will to read and write.
Step S508, whether judgement should with having the backup authority of database file, if execution in step S509 then, otherwise execution in step S510.
Step S509 if having the backup authority, then directly backups to backup directory with database file.Owing to when creating backup directory, opened the access limit of this catalogue, always can carry out so duplicate.
Step S510 if do not have a backup authority, then sends and is broadcast to the object with backup authority, and application or the provider (provider) of backup authority etc. are for example arranged, and notify object backups to backup directory with database file.The present invention has increased the operation of the authority judgement of open backup directory authority and backup side, can can't not carry out because of the authority problem to guarantee backup operation.
Step S511 judges whether to be in predetermined time out section, if execution in step S512 then, otherwise execution in step S513.
Step S512 if be in the time out section, then suspends the backup of database file, and discharges the control to CPU.Discharge the control of CPU through batch-type, can prevent that backup procedure from taking that CPU too highly causes that operation is slow, standby calls out problem such as do not wake up.Release suspends backup after the control of CPU, if the time out section after the past, with the control of recovering automatically CPU, and continues backup on the former again basis.
Step S513 in the backup procedure of database file, detects communication terminal 100 and whether still is in idle condition, if execution in step S514 then, otherwise execution in step S515.
Step S514, if still be in idle condition, the backup of then proceeding database file is until completion.
Step S515 if be not in idle condition, then stops the backup of database file.
Fig. 6 is the process flow diagram of the backup method of database file in the second embodiment of the invention, and it can be realized through communication terminal as shown in Figure 2 100, comprise that step has:
Step S601 receives the backup instruction of database file.
Step S602 detects communication terminal 100 and whether is in idle condition, if execution in step S604 then, otherwise execution in step S603.
Step S603 is if be in busy state, then process ends.
Step S604 if be in idle condition, then needs the former database file of backup, and the former database file that has duplicated is carried out the first database temporary file that rename generates correspondence in the coping database.Preferably the first database temporary file is saved in backup directory; When for example duplicating beginning; With need in certain database the backed up data library file for example contacts.db etc. copy under the backup directory, and name with the mode of database temporary file, for example can adopt the method that increases suffix.
Step S605 in the reproduction process of database file, detects and whether to receive the bright screen broadcasting instructions, if execution in step S607 then, otherwise execution in step S606.
Step S606 if receive the bright screen broadcasting instructions, then stops to duplicate former database file, and deletes the first database temporary file.Because the reproduction process of database file is consuming time longer relatively, need to monitor screen and whether waken up, stopped immediately duplicating normal use if wake up, and these files that duplicated to be deleted with the assurance user.
Step S607 if do not receive the bright screen broadcasting instructions, then proceeds duplicating until completion of former database file.
Step S608, this former database file detect whether to open the first database temporary file after accomplishing and duplicating, if execution in step S609 then, otherwise execution in step S610.If duplicate completion, the interface that then calls data base management system (DBMS) carries out opening operation to the first database temporary file under the backup directory, guarantees the availability of database file.
Step S609 if can successfully open the first database temporary file, explains that this first database temporary file can use, and then the first database temporary file is carried out rename and generates corresponding Backup Data library file.
Step S610 if can not successfully open the first database temporary file, explains that this first database temporary file is unavailable, then deletes the first database temporary file.
Fig. 7 is the flow instance figure that the present invention triggers backup instruction, and it can be realized through communication terminal as shown in Figure 2 100, comprise that step has:
Step S701 receives the screen broadcasting instructions that goes out.
Step S702 detects communication terminal 100 and whether is in idle condition, if execution in step S704 then, otherwise execution in step S703.
Step S703 is if be in busy state, then process ends.
Step S704 if be in idle condition, sets backup T0 reference time of backup next time.T0 generally is taken at daytime, like 16:00, and 0<T0-current time<24 hour).
Step S705 judges that whether T0 deducts 9 minutes greater than the current time, if execution in step S706 then, otherwise execution in step S707.
Step S706 sets timer time T1=T0.
Step S707 sets timer time T1=T0+9 minute.
Step S708, setting-up time are the timer of T1, broadcasting backup instruction when this timer triggers.Preferably, if before timer does not trigger as yet, receive the bright screen broadcasting instructions, then can remove the timer that sends backup broadcasting.
Fig. 8 is the flow instance figure of the method for reducing of database file of the present invention, and it can be realized through communication terminal 100 and recovery module 70 thereof as shown in Figures 2 and 3, comprises that step has:
Step S801, when the database damage, the reduction instruction of trigger data library file;
Step S802, receive the reduction instruction of database file after, delete the said former database file that needs reduction in the said database.
Step S803 detects and whether to have backed up the Backup Data library file corresponding with said former database file, if execution in step S805 then, otherwise execution in step S804.
Step S804, if backup, process ends then.
Step S805 if back up, then duplicates the said Backup Data library file corresponding with said former database file, and the said Backup Data library file that has duplicated is carried out the second database temporary file that rename forms correspondence.
Step S806 carries out rename to the said second database temporary file and forms corresponding new database file, and said new database file is formal database file.
For example, when the user uses application, when visiting this database damage of database discovery of this application, delete the legacy data storehouse earlier, the corresponding data library file that will back up then duplicates reduction from backup directory.Because reduction process is by Event triggered; And require to carry out immediately, so flow process is fairly simple, but same adopt generate earlier the database temporary file again the method for rename carry out; With this relative velocity of accelerating to back up, and the consistance and the integrality of assurance database file.The processing mode of reduction process is included in the method for backup procedure, and is consistent with the processing mode of duplicating to authority, repeats no more here.
In sum, the present invention detects communication terminal and whether is in idle condition after receiving the backup instruction of database file, only is in the back-up job that idle condition is just understood the log-on data library file; And in the backup procedure of database file, further detect communication terminal and whether still be in idle condition,, then continue backup procedure until completion, otherwise stop the backup of database file if still be in idle condition; If the critical data storehouse is damaged in the communication terminal in the future, the available library file of backed up data carries out restoring operation, to avoid information loss.Whereby, the present invention can determine whether according to the current running status of communication terminal starting and continuing backup, not only can improve the backup efficient of database file, and can avoid the influence of backup operation to the operate as normal of communication terminal.Secondly, the present invention has increased the operation of the authority judgement of open backup directory authority and backup side, can can't not carry out because of the authority problem to guarantee backup operation.In addition, the present invention is through introducing the database temporary file, the relative velocity that can accelerate to back up, further simultaneously consistance and the integrality that guarantees database file in backup procedure; In addition, the present invention has also increased the decision operation of opening to the database temporary file, to avoid backing up the database file that has damaged, to guarantee the availability of Backup Data library file.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.
Claims (10)
1. the backup method of a database file is characterized in that, comprises that step has:
After receiving the backup instruction of database file, detect communication terminal and whether be in idle condition;
If be in said idle condition, then carry out the backup of said database file;
In the backup procedure of said database file, detect said communication terminal and whether still be in idle condition;
If still be in said idle condition, the backup of then proceeding said database file is until completion, otherwise stops the backup of said database file.
2. backup method according to claim 1 is characterized in that, the said step of the backup instruction of database file of receiving also comprises before:
After receiving the screen broadcasting instructions that goes out, detect said communication terminal and whether be in idle condition;
If be in said idle condition, set the backup reference time of backup next time;
When said backup arrives reference time, trigger and broadcast the said backup instruction of said database file.
3. backup method according to claim 1 is characterized in that, also comprises:
Set up backup directory, and the access limit of open said backup directory;
Said step of carrying out the backup of said database file also comprises:
Judgement should be with whether having the backup authority of said database file;
If have said backup authority, then directly said database file is backuped to said backup directory;
If do not have said backup authority, then send and be broadcast to object with backup authority, notify said object that said database file is backuped to said backup directory.
4. backup method according to claim 1 is characterized in that, said step of carrying out the backup of said database file also comprises:
Judge whether to be in predetermined time out section;
If be in said time out section, then suspend the backup of said database file, and discharge control central processing unit.
5. according to each described backup method of claim 1~4, it is characterized in that said step of carrying out the backup of said database file also comprises:
The former database file that needs backup in the coping database, and the said former database file that has duplicated is carried out rename generate the first corresponding database temporary file;
Said in the backup procedure of database file, detect the step whether said communication terminal still be in idle condition and comprise:
In the reproduction process of said database file, detect and whether receive the bright screen broadcasting instructions;
Said if still be in idle condition, the backup of then proceeding said database file is until completion, otherwise the step that stops the backup of said database file comprises:
If receive said bright screen broadcasting instructions, then stop to duplicate said former database file, and delete the said first database temporary file;
If do not receive said bright screen broadcasting instructions, then proceed duplicating of said former database file until completion;
This former database file detects and whether can open the said first database temporary file after accomplishing and duplicating;
If can open the said first database temporary file, then the said first database temporary file is carried out rename and generate corresponding Backup Data library file;
If can not open the said first database temporary file, then delete the said first database temporary file.
6. a communication terminal is characterized in that, includes:
First detection module after being used to receive the backup instruction of database file, detects communication terminal and whether is in idle condition;
Backup module is used for when said first detection module detects said communication terminal and is in said idle condition, carrying out the backup of said database file;
Second detection module is used for the backup procedure at said database file, detects said communication terminal and whether still is in idle condition;
Said backup module also is used for when said second detection module detects said communication terminal and still is in said idle condition, and the backup of proceeding said database file is until completion, otherwise stops the backup of said database file.
7. communication terminal according to claim 6 is characterized in that, said communication terminal also comprises:
The 3rd detection module, be used to receive go out the screen broadcasting instructions after, detect said communication terminal and whether be in idle condition;
The time set module is used for when said the 3rd detection module detects said communication terminal and is in said idle condition, sets the backup reference time of backup next time;
The instruction triggers module is used for when said backup arrives reference time, triggering and broadcast the said backup instruction of said database file.
8. communication terminal according to claim 6 is characterized in that, said communication terminal also comprises:
Catalogue is set up module, is used to set up backup directory, and the access limit of open said backup directory;
The authority judge module is used for when said first detection module detects said communication terminal and is in said idle condition, judging whether said backup module has the backup authority of said database file;
When said backup module also is used to have said backup authority, directly said database file is backuped to said backup directory; And when being used for not having said backup authority, sending and be broadcast to the object with backup authority, notify said object that said database file is backuped to said backup directory.
9. communication terminal according to claim 6 is characterized in that, said backup module also comprises:
Judge submodule, be used to judge whether to be in predetermined time out section;
Suspend submodule, when being used to be in said time out section, suspending the backup of said database file, and discharge control central processing unit.
10. according to each described communication terminal of claim 6~9, it is characterized in that said backup module also comprises the replicon module and stops submodule;
Said replicon module is used for the former database file that the coping database needs back up, and the said former database file that has duplicated is carried out the first database temporary file that rename generates correspondence;
Said second detection module also is used for the reproduction process at said database file, detects and whether receives the bright screen broadcasting instructions;
The said submodule that stops when being used to receive said bright screen broadcasting instructions, stopping to duplicate said former database file, and deletes the said first database temporary file;
When said replicon module also is used for not receiving said bright screen broadcasting instructions, then proceed duplicating of said former database file, and the said first database temporary file is carried out rename generate corresponding backup data files until completion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210217423.XA CN102841827B (en) | 2012-06-28 | 2012-06-28 | Method for backuping database files and communication terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210217423.XA CN102841827B (en) | 2012-06-28 | 2012-06-28 | Method for backuping database files and communication terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102841827A true CN102841827A (en) | 2012-12-26 |
CN102841827B CN102841827B (en) | 2015-04-08 |
Family
ID=47369222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210217423.XA Expired - Fee Related CN102841827B (en) | 2012-06-28 | 2012-06-28 | Method for backuping database files and communication terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102841827B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103744749A (en) * | 2014-01-11 | 2014-04-23 | 浪潮电子信息产业股份有限公司 | Virtual machine intelligent backup method based on prediction algorithm |
CN105786647A (en) * | 2016-02-25 | 2016-07-20 | 努比亚技术有限公司 | Data backup device and method and terminal |
CN106201714A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | A kind of ODEX optimization method and system |
CN106528582A (en) * | 2015-09-15 | 2017-03-22 | 北京国双科技有限公司 | Database backup method and device |
CN108228384A (en) * | 2016-12-22 | 2018-06-29 | 北京奇虎科技有限公司 | A kind of method and apparatus of backup enterprise terminal data |
WO2018177036A1 (en) * | 2017-03-31 | 2018-10-04 | 平安科技(深圳)有限公司 | Database data archiving method and system, terminal, and computer readable storage medium |
CN110233851A (en) * | 2019-06-21 | 2019-09-13 | 北京神州绿盟信息安全科技股份有限公司 | A kind of data transmission method and device |
CN110471846A (en) * | 2019-07-23 | 2019-11-19 | 平安科技(深圳)有限公司 | Test data processing method, device and computer equipment based on automation platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020120733A1 (en) * | 2001-01-26 | 2002-08-29 | Gerhard Kring | Method, program and arrangement for synchronizing a network manager to a network agent |
CN1980458A (en) * | 2005-11-30 | 2007-06-13 | 中兴通讯股份有限公司 | Method for realizing information back-up at network side |
CN101765238A (en) * | 2009-12-29 | 2010-06-30 | 上海闻泰电子科技有限公司 | Intelligent backup time recognition method of mobile terminal |
CN102289396A (en) * | 2011-09-01 | 2011-12-21 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and backup and recovery method |
-
2012
- 2012-06-28 CN CN201210217423.XA patent/CN102841827B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020120733A1 (en) * | 2001-01-26 | 2002-08-29 | Gerhard Kring | Method, program and arrangement for synchronizing a network manager to a network agent |
CN1980458A (en) * | 2005-11-30 | 2007-06-13 | 中兴通讯股份有限公司 | Method for realizing information back-up at network side |
CN101765238A (en) * | 2009-12-29 | 2010-06-30 | 上海闻泰电子科技有限公司 | Intelligent backup time recognition method of mobile terminal |
CN102289396A (en) * | 2011-09-01 | 2011-12-21 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and backup and recovery method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103744749A (en) * | 2014-01-11 | 2014-04-23 | 浪潮电子信息产业股份有限公司 | Virtual machine intelligent backup method based on prediction algorithm |
CN106528582A (en) * | 2015-09-15 | 2017-03-22 | 北京国双科技有限公司 | Database backup method and device |
CN106528582B (en) * | 2015-09-15 | 2019-07-23 | 北京国双科技有限公司 | The backup method and device of database |
CN105786647A (en) * | 2016-02-25 | 2016-07-20 | 努比亚技术有限公司 | Data backup device and method and terminal |
CN106201714A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | A kind of ODEX optimization method and system |
CN108228384A (en) * | 2016-12-22 | 2018-06-29 | 北京奇虎科技有限公司 | A kind of method and apparatus of backup enterprise terminal data |
WO2018177036A1 (en) * | 2017-03-31 | 2018-10-04 | 平安科技(深圳)有限公司 | Database data archiving method and system, terminal, and computer readable storage medium |
CN110233851A (en) * | 2019-06-21 | 2019-09-13 | 北京神州绿盟信息安全科技股份有限公司 | A kind of data transmission method and device |
CN110471846A (en) * | 2019-07-23 | 2019-11-19 | 平安科技(深圳)有限公司 | Test data processing method, device and computer equipment based on automation platform |
CN110471846B (en) * | 2019-07-23 | 2024-05-07 | 平安科技(深圳)有限公司 | Test data processing method and device based on automation platform and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN102841827B (en) | 2015-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102841827B (en) | Method for backuping database files and communication terminal | |
US11892922B2 (en) | State management methods, methods for switching between master application server and backup application server, and electronic devices | |
CN111327467A (en) | Server system, disaster recovery backup method thereof and related equipment | |
CN101908980A (en) | Network management upgrading method and system | |
CN105354113A (en) | Server, and system and method for managing server | |
CN110109772B (en) | CPU restarting method, communication equipment and readable storage medium | |
CN104917630A (en) | Method for recovering virtual network and system for recovering virtual network | |
CN112333008B (en) | Cloud host complete machine backup and restoration method, device, equipment and storage medium | |
CN108352995B (en) | SMB service fault processing method and storage device | |
CN112052127B (en) | Data synchronization method and device for dual-computer hot standby environment | |
CN104063262A (en) | Remote disaster recovery system and remote disaster recovery method based on virtual machines | |
CN104615511A (en) | Host batch recovery processing method and device based on double centers | |
CN111176900A (en) | Distributed storage system and data recovery method, device and medium thereof | |
CN108173665B (en) | Data backup method and device | |
CN114356650A (en) | Data backup method, device, equipment, system and storage medium | |
CN110597660A (en) | Data backup method, device, equipment and medium for virtual machine | |
CN113986450A (en) | Virtual machine backup method and device | |
CN101340675A (en) | Method and apparatus for implementing backup and recovery by mobile terminal | |
CN111371642B (en) | Network card fault detection method, device, equipment and storage medium | |
CN100362760C (en) | Duplication of distributed configuration database system | |
KR960028033A (en) | SMX-1 redundant operation management device and method | |
CN112486713B (en) | Frozen screen processing method and electronic equipment | |
CN113297134B (en) | Data processing system, data processing method and device, and electronic device | |
CN100445982C (en) | Computer restoration system and method with multiple restoring points | |
CN110688259B (en) | Private cloud backup recovery system and backup recovery method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
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: 20150408 Termination date: 20210628 |