CN104050059A - Method and system for data backup and recovery - Google Patents

Method and system for data backup and recovery Download PDF

Info

Publication number
CN104050059A
CN104050059A CN201410310678.XA CN201410310678A CN104050059A CN 104050059 A CN104050059 A CN 104050059A CN 201410310678 A CN201410310678 A CN 201410310678A CN 104050059 A CN104050059 A CN 104050059A
Authority
CN
China
Prior art keywords
data
backup
backup data
directory
obtaining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410310678.XA
Other languages
Chinese (zh)
Inventor
刘新典
刘桂峰
姚辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Juntian Electronic Technology Co Ltd
Original Assignee
Zhuhai Juntian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Juntian Electronic Technology Co Ltd filed Critical Zhuhai Juntian Electronic Technology Co Ltd
Priority to CN201410310678.XA priority Critical patent/CN104050059A/en
Publication of CN104050059A publication Critical patent/CN104050059A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The embodiment of the invention discloses a method and system for data backup and recovery. Compared with the prior art, the data read-write speed of file backup and recovery of a system database can be increased, the user experience can be improved in the backup and recovery process, and the read-write permission limitation is avoided. The method for data backup includes the steps of obtaining the ROOT permission of the system, acquiring the data needing to be backed up, and copying the data needing to be backed up to a duplicate catalog. The method for data recovery includes the steps of obtaining the ROOT permission of the system, acquiring backup data, and copying the backup data to an original catalog of the system. The method and system for data backup and recovery are suitable for occasions where the file backup and recovery speed of the system database can be increased.

Description

The method and system of a kind of backup and restoring data
Technical field
The present invention relates to mobile Internet applied technical field, relate in particular to the method and system of a kind of backup and restoring data.
Background technology
Current common Mobile operating system as Android (Android) operating system in, the information such as contact person, note, message registration are kept in database file.
Application program can be passed through invokes application DLL (dynamic link library) (Application Programming Interface, abbreviation API) read these database files, and these database files that read are saved as to Backup Data, can the Backup Data of preservation be reverted back in system by calling API afterwards.
Backup and reduction instrument in Android system, the class ContentResolver providing with API reads and writes the database library file data of contact person, note, message registration etc., is to read and write actual data by interface ContentProvider like this.The address that contact person reads and writes the Uri that needs access is content: //com.android.contacts, need to access a plurality of subpaths under this Uri, and the data that these access are obtained combine the complete content that just can obtain contact person.Similarly, the read-write of note or multimedia message need to by access content: //sms and content: //mms carries out, and the read-write of message registration needs to access content: //call_log/calls.In fact this interface is the encapsulation to raw data read-write, and through the encapsulation of this first level logical, data read-write efficiency understands that some is low.And application program need to be obtained the operation that the authority of contact person, note, message registration just can be correlated with to system statement.
Summary of the invention
In view of this, the embodiment of the present invention provides the method and system of a kind of backup and restoring data, can, compared with the reading and writing data speed of prior art elevator system Backup of database files or reduction, improve the efficiency of backup or restoring data.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, the embodiment of the present invention provides a kind of method of Backup Data, comprising:
Obtain system ROOT authority;
Obtain the data that will back up;
By the described data Replica that will back up to backup directory.
The method of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after getting the data that will back up, by the described data Replica that will back up to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
On the other hand, the embodiment of the present invention provides a kind of method of Backup Data, comprising:
Obtain system ROOT authority;
Choose the data that will back up;
The described data that will back up of choosing are carried out to format conversion according to default form;
By the described data Replica that will back up that is converted into described default form to backup directory.
The method of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing the data that will back up, the described data that will back up of choosing are carried out to format conversion according to default form, and by the described data Replica that will back up that is converted into described default form to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
On the other hand, the embodiment of the present invention provides a kind of method of restoring data, comprising:
Obtain system ROOT authority;
Obtain Backup Data;
Described Backup Data is copied to system original directory.
The method of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after the Backup Data in getting backup directory, just described Backup Data copies to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency.
On the other hand, the embodiment of the present invention provides a kind of method of restoring data, comprising:
Obtain system ROOT authority;
Choose Backup Data;
The described Backup Data of choosing is converted into the compatible form of current system;
The described Backup Data that is converted into described form is copied to system original directory.
The method of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing Backup Data, the described Backup Data of choosing is converted into the compatible form of current system, and the described Backup Data that is converted into described form is copied to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency, and can solve the compatibility issue of data reduction.
On the other hand, the embodiment of the present invention provides a kind of system of Backup Data, comprising: the first authority acquiring unit, for obtaining system ROOT authority; The first data capture unit, for obtaining the data that will back up; The first copied cells, for by the described data Replica that will back up to backup directory.
The system of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after getting the data that will back up, by the described data Replica that will back up to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
On the other hand, the embodiment of the present invention provides a kind of system of Backup Data, comprising: the second authority acquiring unit, for obtaining system ROOT authority; The second data capture unit, for choosing the data that will back up;
The first format conversion unit, carries out format conversion for the described data that will back up that described the second data capture unit is chosen according to default form; The second copied cells, for by the described data Replica that will back up that is converted into described default form to backup directory.
The system of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing the data that will back up, the described data that will back up of choosing are carried out to format conversion according to default form, and by the described data Replica that will back up that is converted into described default form to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
On the other hand, the embodiment of the present invention provides a kind of system of restoring data, comprising: the 3rd authority acquiring unit, for obtaining system ROOT authority; The 3rd data capture unit, for obtaining Backup Data; The 3rd copied cells, for copying to system original directory by described Backup Data.
The system of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after the Backup Data in getting backup directory, just described Backup Data copies to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency.
On the other hand, the embodiment of the present invention provides a kind of system of restoring data, comprising: the 4th authority acquiring unit, for obtaining system ROOT authority; The 4th data capture unit, for choosing Backup Data; The second format conversion unit, is converted into the compatible form of current system for the described Backup Data that described the 4th data capture unit is chosen; The 4th copied cells, for copying to system original directory by the described Backup Data that is converted into described form.
The system of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing Backup Data, the described Backup Data of choosing is converted into the compatible form of current system, and the described Backup Data that is converted into described form is copied to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency, and can solve the compatibility issue of data reduction.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the schematic flow sheet of method one embodiment of Backup Data of the present invention;
Fig. 2 is the schematic flow sheet of method one embodiment of Backup Data of the present invention;
Fig. 3 is the schematic flow sheet of T3 mono-embodiment in Fig. 2;
Fig. 4 is the schematic flow sheet of method one embodiment of restoring data of the present invention;
Fig. 5 is the schematic flow sheet of method one embodiment of restoring data of the present invention;
Fig. 6 is the schematic flow sheet of Q3 mono-embodiment in Fig. 5;
Fig. 7 is the schematic flow sheet of Q4 mono-embodiment in Fig. 5;
Fig. 8 is the frame structure schematic diagram of system one embodiment of Backup Data of the present invention;
Fig. 9 is the frame structure schematic diagram of system one embodiment of Backup Data of the present invention;
Figure 10 is the frame structure schematic diagram of the first format conversion unit one embodiment in Fig. 9;
Figure 11 is the frame structure schematic diagram of system one embodiment of restoring data of the present invention;
Figure 12 is the frame structure schematic diagram of system one embodiment of restoring data of the present invention;
Figure 13 is the frame structure schematic diagram of the second format conversion unit one embodiment in Figure 12;
Figure 14 is the frame structure schematic diagram of the 4th copied cells one embodiment in Figure 12.
Embodiment
Below in conjunction with accompanying drawing, the method and system of the method and system of two kinds of Backup Datas of the embodiment of the present invention, two kinds of restoring datas are described in detail.
Should be clear and definite, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
Referring to Fig. 1, embodiments of the invention provide a kind of method of Backup Data, comprising:
S1, obtain system ROOT authority;
S2, obtain the data that will back up;
S3, by the described data Replica that will back up to backup directory.
The method of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after getting the data that will back up, by the described data Replica that will back up to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of contact person and/or message registration; Wherein
The described data that will back up of obtaining, can comprise:
By inquiry system catalogue/data/data/com.android.providers.contacts/databases, obtain the raw data of contact person and/or message registration.
In the present embodiment, in Android system, the raw data of contact person and message registration leaves system directory/data/data/com.android.providers.contacts/databases in, by direct access system catalogue/data/data/com.android.providers.contacts/databases, can be convenient to quick obtaining to the raw data of contact person and/or message registration.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of contact head image; Wherein
The described data that will back up of obtaining, can comprise:
By inquiry system catalogue/data/data/com.android.providers.contacts/files/photos, obtain the raw data of contact head image.
In the present embodiment, for Android4.0 or highest version (or api class other 14 and more than) system more, also need to back up contact head image.In Android system, the raw data of contact head image leaves system directory/data/data/com.android.providers.contacts/files/photos in, by direct access system catalogue/data/data/com.android.providers.contacts/files/photos, can be convenient to quick obtaining to the raw data of contact head image.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of note and/or multimedia message;
Wherein, described in obtain the data that will back up, can comprise:
By inquiry system catalogue/data/data/com.android.providers.telephony/databases, obtain the raw data of note and/or multimedia message.
In the present embodiment, in Android system, the raw data of note and multimedia message leaves system directory/data/data/com.android.providers.telephony/databases in, by direct access system catalogue/data/data/com.android.providers.telephony/databases, can be convenient to quick obtaining to the raw data of note and/or multimedia message.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described by the described data Replica that will back up to backup directory, can comprise: the raw data of described contact head image is packed, and the raw data of described contact head image after packing is copied to backup directory.
Referring to Fig. 2, embodiments of the invention provide a kind of method of Backup Data, comprising:
T1, obtain system ROOT authority;
T2, choose the data that will back up;
T3, the described data that will back up of choosing are carried out to format conversion according to default form;
T4, by the described data Replica that will back up that is converted into described default form to backup directory.
The method of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing the data that will back up, the described data that will back up of choosing are carried out to format conversion according to default form, and by the described data Replica that will back up that is converted into described default form to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
Alternatively, referring to Fig. 3, in another embodiment of the method for Backup Data of the present invention, described the described data that will back up of choosing are carried out to format conversion (T3) according to default form, can comprise:
T30, the described data that will back up of choosing are read to internal memory;
T31, the described data that will back up in internal memory are carried out to format conversion according to default form.
In the present embodiment, by the data that will back up of choosing are read to internal memory, and the described data that will back up in internal memory are carried out to format conversion according to default form, make it possible to be convenient to the data after backup to reduce in the system of using described default form.
Alternatively, in another embodiment of the method for Backup Data of the present invention, described the described data that will back up of choosing are read to internal memory, can comprise:
By the database execution architecture query language at the described data place that will back up of choosing (Structured Query Language is called for short SQL) query manipulation is read to internal memory by the described data that will back up.
In the present embodiment, the data that will back up by the select statement of carrying out in SQL read internal memory, and the data that can be convenient to backing up are carried out format conversion.
Alternatively, in another embodiment of the method for Backup Data of the present invention, the described data that will back up are picture, and described method also comprises: described picture is packed, and by the described picture reproduction after packing to backup directory.
In the present embodiment, by picture is first packed, then copy to backup directory, make the data after backup more regular.
Referring to Fig. 4, embodiments of the invention provide a kind of method of restoring data, comprising:
P1, obtain system ROOT authority;
P2, obtain Backup Data;
P3, described Backup Data is copied to system original directory.
The method of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after the Backup Data in getting backup directory, just described Backup Data copies to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency.
Alternatively, in another embodiment of the method for restoring data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of contact person and/or message registration; Wherein
Described described Backup Data is copied to system original directory, can comprise:
The Backup Data of contact person and/or message registration is copied to system directory/data/data/com.android.providers.contacts/databases.
In the present embodiment, in Android system, the raw data of contact person and message registration leaves system directory/data/data/com.android.providers.contacts/databases in.
Alternatively, in another embodiment of the method for restoring data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of contact head image; Wherein
Described described Backup Data is copied to system original directory, can comprise:
The Backup Data of contact head image is copied to system directory/data/data/com.android.providers.contacts/files/photos.
In the present embodiment, in Android system, the raw data of contact head image leaves system directory/data/data/com.android.providers.contacts/files/photos in.
Alternatively, in another embodiment of the method for restoring data of the present invention, the described Backup Data by contact head image copies to system directory/data/data/com.android.providers.contacts/files/photos, can comprise:
The Backup Data of contact head image is unpacked, and the Backup Data of the described contact head image after unpacking is copied to system directory/data/data/com.android.providers.contacts/files/photos.
In the present embodiment, in Android system, contact head image is that form with picture is stored in system library file, therefore when the contact head image packet in backup directory is reverted back to system, need first contact head image packet to be unpacked, then the contact head image data after unpacking could be reverted back in system.
Alternatively, in another embodiment of the method for restoring data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of note and/or multimedia message;
Wherein, described described Backup Data is copied to system original directory, can comprise:
The Backup Data of note and/or multimedia message is copied to system directory/data/data/com.android.providers.telephony/databases.
In the present embodiment, in Android system, the raw data of note and multimedia message leaves system directory/data/data/com.android.providers.telephony/databases in.
Referring to Fig. 5, embodiments of the invention provide a kind of method of restoring data, comprising:
Q1, obtain system ROOT authority;
Q2, choose Backup Data;
Q3, the described Backup Data of choosing is converted into the compatible form of current system;
Q4, the described Backup Data that is converted into described form is copied to system original directory.
The method of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing Backup Data, the described Backup Data of choosing is converted into the compatible form of current system, and the described Backup Data that is converted into described form is copied to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency, and can solve the compatibility issue of data reduction.
Alternatively, in another embodiment of the method for restoring data of the present invention, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
Alternatively, referring to Fig. 6, in another embodiment of the method for restoring data of the present invention, described the described Backup Data of choosing is converted into the compatible form of current system (Q3), can comprises:
Q30, the described Backup Data of choosing is read in internal memory;
Q31, the described Backup Data in internal memory is converted into the compatible form of current system.
In the present embodiment, by Backup Data is read in internal memory, and the described Backup Data in internal memory is converted into the compatible form of current system, can be convenient to described Backup Data to revert back in current system.
Alternatively, referring to Fig. 7, in another embodiment of the method for restoring data of the present invention, described the described Backup Data that is converted into described form is copied to system original directory (Q4), can comprise:
Q40, the described Backup Data that is converted into described form is write in temporary file;
Q41, the described Backup Data in described temporary file is copied to system original directory.
In the present embodiment, by the Backup Data transforming after form is write in temporary file, and from temporary file, described Backup Data is copied to system original directory, than directly from internal memory, described Backup Data being copied to system original directory, the reduction rate of Backup Data can be significantly improved, and a plurality of application programs operating system original directories and the problem that can not successfully reduce that occurs simultaneously can be avoided.
Alternatively, in another embodiment of the method for restoring data of the present invention, described the described Backup Data that is converted into described form is write in temporary file, can comprise: by the described Backup Data that is converted into described form is carried out to SQL update, described Backup Data is write in temporary file.
In the present embodiment, by carrying out the insert statement in SQL, can be convenient to Backup Data to write in temporary file.
Alternatively, in another embodiment of the method for restoring data of the present invention, described described Backup Data in described temporary file is copied to system original directory, can comprise: the text data in the described Backup Data in described temporary file is copied to system original directory; And/or
Image data in described Backup Data in described temporary file is unpacked, and the described image data after unpacking is copied to system original directory.
In the present embodiment, in Android system, contact head image is that form with picture is stored in system library file, therefore when the contact head image packet in temporary file is reverted back to system, need first contact head image packet to be unpacked, then the contact head image data after unpacking could be reverted back in system.
Referring to Fig. 8, embodiments of the invention provide a kind of system of Backup Data, comprising: the first authority acquiring unit 1, for obtaining system ROOT authority; The first data capture unit 2, for obtaining the data that will back up; The first copied cells 3, for by the described data Replica that will back up to backup directory.
The system of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after getting the data that will back up, by the described data Replica that will back up to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the first authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of contact person and/or message registration; Wherein said the first data capture unit, for obtaining the raw data of contact person and/or message registration by inquiry system catalogue/data/data/com.android.providers.contacts/databases.
In the present embodiment, in Android system, the raw data of contact person and message registration leaves system directory/data/data/com.android.providers.contacts/databases in, by direct access system catalogue/data/data/com.android.providers.contacts/databases, can be convenient to quick obtaining to the raw data of contact person and/or message registration.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the first authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of contact head image; Wherein said the first data capture unit, for obtaining the raw data of contact head image by inquiry system catalogue/data/data/com.android.providers.contacts/files/photos.
In the present embodiment, for Android4.0 or highest version (or api class other 14 and more than) system more, also need to back up contact head image.In Android system, the raw data of contact head image leaves system directory/data/data/com.android.providers.contacts/files/photos in, by direct access system catalogue/data/data/com.android.providers.contacts/files/photos, can be convenient to quick obtaining to the raw data of contact head image.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the first authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of note and/or multimedia message; Wherein, described the first data capture unit, for obtaining the raw data of note and/or multimedia message by inquiry system catalogue/data/data/com.android.providers.telephony/databases.
In the present embodiment, in Android system, the raw data of note and multimedia message leaves system directory/data/data/com.android.providers.telephony/databases in, by direct access system catalogue/data/data/com.android.providers.telephony/databases, can be convenient to quick obtaining to the raw data of note and/or multimedia message.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the first copied cells, for the raw data of described contact head image is packed, and copies to backup directory by the raw data of the described contact head image after packing.
Referring to Fig. 9, embodiments of the invention provide a kind of system of Backup Data, comprising: the second authority acquiring unit 4, for obtaining system ROOT authority; The second data capture unit 5, for choosing the data that will back up; The first format conversion unit 6, carries out format conversion for the described data that will back up that described the second data capture unit 5 is chosen according to default form; The second copied cells 7, for by the described data Replica that will back up that is converted into described default form to backup directory.
The system of the Backup Data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing the data that will back up, the described data that will back up of choosing are carried out to format conversion according to default form, and by the described data Replica that will back up that is converted into described default form to backup directory, can be more directly, rapidly data are backed up, improve backup efficiency.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the second authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
Alternatively, referring to Figure 10, in another embodiment of the system of Backup Data of the present invention, described the first format conversion unit 6, can comprise: first reads subelement 60, for the described data that will back up that described the second data capture unit 5 is chosen, read internal memory; The first format conversion subelement 61, for carrying out format conversion by the described data that will back up of internal memory according to default form.
In the present embodiment, by the data that will back up of choosing are read to internal memory, and the described data that will back up in internal memory are carried out to format conversion according to default form, make it possible to be convenient to the data after backup to reduce in the system of using described default form.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described first reads subelement, carries out SQL query operation the described data that will back up are read to internal memory for the database at the described data place that will back up by described the second data capture unit is chosen.
In the present embodiment, the data that will back up by the select statement of carrying out in SQL read internal memory, and the data that can be convenient to backing up are carried out format conversion.
Alternatively, in another embodiment of the system of Backup Data of the present invention, described the second copied cells, also packs for the picture that will back up, and by the described picture reproduction after packing to backup directory.In the present embodiment, by picture is first packed, then copy to backup directory, make the data after backup more regular.
Referring to Figure 11, embodiments of the invention provide a kind of system of restoring data, comprising: the 3rd authority acquiring unit 8, for obtaining system ROOT authority; The 3rd data capture unit 9, for obtaining Backup Data; The 3rd copied cells 10, for copying to system original directory by described Backup Data.
The system of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after the Backup Data in getting backup directory, just described Backup Data copies to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency.
Alternatively, in another embodiment of the system of restoring data of the present invention, described the 3rd authority acquiring unit, for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of contact person and/or message registration; Wherein said the 3rd copied cells, for copying to system directory/data/data/com.android.providers.contacts/databases by the Backup Data of contact person and/or message registration.
In the present embodiment, in Android system, the raw data of contact person and message registration leaves system directory/data/data/com.android.providers.contacts/databases in.
Alternatively, in another embodiment of the system of restoring data of the present invention, described the 3rd authority acquiring unit, for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of contact head image; Wherein said the 3rd copied cells, for copying to system directory/data/data/com.android.providers.contacts/files/photos by the Backup Data of contact head image.
In the present embodiment, in Android system, the raw data of contact head image leaves system directory/data/data/com.android.providers.contacts/files/photos in.
Alternatively, in another embodiment of the system of restoring data of the present invention, described the 3rd copied cells, for the Backup Data of contact head image is unpacked, and the Backup Data of the described contact head image after unpacking is copied to system directory/data/data/com.android.providers.contacts/files/photos.
In the present embodiment, in Android system, contact head image is that form with picture is stored in system library file, therefore when the contact head image packet in backup directory is reverted back to system, need first contact head image packet to be unpacked, then the contact head image data after unpacking could be reverted back in system.
Alternatively, in another embodiment of the system of restoring data of the present invention, described the 3rd authority acquiring unit, for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of note and/or multimedia message; Wherein, described the 3rd copied cells, for copying to system directory/data/data/com.android.providers.telephony/databases by the Backup Data of note and/or multimedia message.
In the present embodiment, in Android system, the raw data of note and multimedia message leaves system directory/data/data/com.android.providers.telephony/databases in.
Referring to Figure 12, embodiments of the invention provide a kind of system of restoring data, comprising: the 4th authority acquiring unit 11, for obtaining system ROOT authority; The 4th data capture unit 12, for choosing Backup Data; The second format conversion unit 13, is converted into the compatible form of current system for the described Backup Data that described the 4th data capture unit 12 is chosen; The 4th copied cells 14, for copying to system original directory by the described Backup Data that is converted into described form.
The system of the restoring data that the embodiment of the present invention provides, by obtaining system ROOT authority, and after choosing Backup Data, the described Backup Data of choosing is converted into the compatible form of current system, and the described Backup Data that is converted into described form is copied to system original directory, can be more directly, rapidly data are reduced, improve reduction efficiency, and can solve the compatibility issue of data reduction.
Alternatively, in another embodiment of the system of restoring data of the present invention, described the 4th authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
Alternatively, referring to Figure 13, in another embodiment of the system of restoring data of the present invention, described the second format conversion unit 13, can comprise: second reads subelement 130, for the described Backup Data that described the 4th data capture unit 12 is chosen, read internal memory; The second format conversion subelement 131, for being converted into the compatible form of current system by the described Backup Data of internal memory.
In the present embodiment, by Backup Data is read in internal memory, and the described Backup Data in internal memory is converted into the compatible form of current system, can be convenient to described Backup Data to revert back in current system.
Alternatively, referring to Figure 14, in another embodiment of the system of restoring data of the present invention, described the 4th copied cells 14, can comprise: write subelement 140, for the described Backup Data that is converted into described form is write to temporary file; Replicon unit 141, for copying to system original directory by the described Backup Data of described temporary file.
In the present embodiment, by the Backup Data transforming after form is write in temporary file, and from temporary file, described Backup Data is copied to system original directory, than directly from internal memory, described Backup Data being copied to system original directory, the reduction rate of Backup Data can be significantly improved, and a plurality of application programs operating system original directories and the problem that can not successfully reduce that occurs simultaneously can be avoided.
Alternatively, in another embodiment of the system of restoring data of the present invention, said write subelement, for writing temporary file by the described Backup Data that is converted into described form is carried out to SQL update by described Backup Data.In the present embodiment, by carrying out the insert statement in SQL, can be convenient to Backup Data to write in temporary file.
Alternatively, in another embodiment of the system of restoring data of the present invention, described replicon unit is also for the picture after packing is unpacked, and by the described picture reproduction after unpacking to system original directory.
In the present embodiment, in Android system, contact head image is that form with picture is stored in system library file, therefore when the contact head image packet in temporary file is reverted back to system, need first contact head image packet to be unpacked, then the contact head image data after unpacking could be reverted back in system.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, described program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (RandomAccess Memory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (42)

1. a method for Backup Data, is characterized in that, comprising:
Obtain system ROOT authority;
Obtain the data that will back up;
By the described data Replica that will back up to backup directory.
2. the method for Backup Data according to claim 1, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of contact person and/or message registration; Wherein
The described data that will back up of obtaining comprise:
By inquiry system catalogue/data/data/com.android.providers.contacts/databases, obtain the raw data of contact person and/or message registration.
3. the method for Backup Data according to claim 1, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of contact head image; Wherein
The described data that will back up of obtaining comprise:
By inquiry system catalogue/data/data/com.android.providers.contacts/files/photos, obtain the raw data of contact head image.
4. the method for Backup Data according to claim 1, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up comprise the raw data of note and/or multimedia message;
Wherein, described in obtain the data that will back up, comprising:
By inquiry system catalogue/data/data/com.android.providers.telephony/databases, obtain the raw data of note and/or multimedia message.
5. the method for Backup Data according to claim 3, is characterized in that, described by the described data Replica that will back up to backup directory, comprising:
The raw data of described contact head image is packed, and the raw data of the described contact head image after packing is copied to backup directory.
6. a method for Backup Data, is characterized in that, comprising:
Obtain system ROOT authority;
Choose the data that will back up;
The described data that will back up of choosing are carried out to format conversion according to default form;
By the described data Replica that will back up that is converted into described default form to backup directory.
7. the method for Backup Data according to claim 6, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
8. according to the method for the Backup Data described in claim 6 or 7, it is characterized in that, described the described data that will back up of choosing carried out to format conversion according to default form, comprising:
The described data that will back up of choosing are read to internal memory;
The described data that will back up in internal memory are carried out to format conversion according to default form.
9. the method for Backup Data according to claim 8, is characterized in that, described the described data that will back up of choosing is read to internal memory, comprising:
By the database execution architecture query language query manipulation to the described data place that will back up of choosing, the described data that will back up are read to internal memory.
10. the method for Backup Data according to claim 6, is characterized in that, the described data that will back up are picture, and described method also comprises:
Described picture is packed, and the described picture reproduction after packing is arrived to backup directory.
The method of 11. 1 kinds of restoring datas, is characterized in that, comprising:
Obtain system ROOT authority;
Obtain Backup Data;
Described Backup Data is copied to system original directory.
The method of 12. restoring datas according to claim 11, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of contact person and/or message registration; Wherein
Described described Backup Data is copied to system original directory, comprising:
The Backup Data of contact person and/or message registration is copied to system directory/data/data/com.android.providers.contacts/databases.
The method of 13. restoring datas according to claim 11, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of contact head image; Wherein
Described described Backup Data is copied to system original directory, comprising:
The Backup Data of contact head image is copied to system directory/data/data/com.android.providers.contacts/files/photos.
The method of 14. restoring datas according to claim 13, is characterized in that, the described Backup Data by contact head image copies to system directory/data/data/com.android.providers.contacts/files/photos, comprising:
The Backup Data of contact head image is unpacked, and the Backup Data of the described contact head image after unpacking is copied to system directory/data/data/com.android.providers.contacts/files/photos.
The method of 15. restoring datas according to claim 11, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; Described Backup Data comprises the Backup Data of note and/or multimedia message;
Wherein, described described Backup Data is copied to system original directory, comprising:
The Backup Data of note and/or multimedia message is copied to system directory/data/data/com.android.providers.telephony/databases.
The method of 16. 1 kinds of restoring datas, is characterized in that, comprising:
Obtain system ROOT authority;
Choose Backup Data;
The described Backup Data of choosing is converted into the compatible form of current system;
The described Backup Data that is converted into described form is copied to system original directory.
The method of 17. restoring datas according to claim 16, is characterized in that, described in obtain system ROOT authority and comprise the ROOT authority of obtaining Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
18. according to the method for the restoring data described in claim 16 or 17, it is characterized in that, described the described Backup Data of choosing is converted into the compatible form of current system, comprising:
The described Backup Data of choosing is read in internal memory;
Described Backup Data in internal memory is converted into the compatible form of current system.
The method of 19. restoring datas according to claim 16, is characterized in that, described the described Backup Data that is converted into described form is copied to system original directory, comprising:
The described Backup Data that is converted into described form is write in temporary file;
Described Backup Data in described temporary file is copied to system original directory.
The method of 20. restoring datas according to claim 19, is characterized in that, described the described Backup Data that is converted into described form is write in temporary file, comprising:
By the described Backup Data execution architecture query language update that is converted into described form is write described Backup Data in temporary file.
21. according to the method for the restoring data described in claim 19 or 20, it is characterized in that, described described Backup Data in described temporary file is copied to system original directory, comprising:
Text data in described Backup Data in described temporary file is copied to system original directory; And/or
Image data in described Backup Data in described temporary file is unpacked, and the described image data after unpacking is copied to system original directory.
The system of 22. 1 kinds of Backup Datas, is characterized in that, comprising:
The first authority acquiring unit, for obtaining system ROOT authority;
The first data capture unit, for obtaining the data that will back up;
The first copied cells, for by the described data Replica that will back up to backup directory.
The system of 23. Backup Datas according to claim 22, is characterized in that, described the first authority acquiring unit is for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of contact person and/or message registration; Wherein
Described the first data capture unit, for obtaining the raw data of contact person and/or message registration by inquiry system catalogue/data/data/com.android.providers.contacts/databases.
The system of 24. Backup Datas according to claim 22, is characterized in that, described the first authority acquiring unit is for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of contact head image; Wherein
Described the first data capture unit, for obtaining the raw data of contact head image by inquiry system catalogue/data/data/com.android.providers.contacts/files/photos.
The system of 25. Backup Datas according to claim 22, is characterized in that, described the first authority acquiring unit is for obtaining the ROOT authority of Android operating system; The described data that will back up comprise the raw data of note and/or multimedia message;
Wherein, described the first data capture unit, for obtaining the raw data of note and/or multimedia message by inquiry system catalogue/data/data/com.android.providers.telephony/databases.
The system of 26. Backup Datas according to claim 24, is characterized in that, described the first copied cells for the raw data of described contact head image is packed, and copies to backup directory by the raw data of the described contact head image after packing.
The system of 27. 1 kinds of Backup Datas, is characterized in that, comprising:
The second authority acquiring unit, for obtaining system ROOT authority;
The second data capture unit, for choosing the data that will back up;
The first format conversion unit, carries out format conversion for the described data that will back up that described the second data capture unit is chosen according to default form;
The second copied cells, for by the described data Replica that will back up that is converted into described default form to backup directory.
The system of 28. Backup Datas according to claim 27, is characterized in that, described the second authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
29. according to the system of the Backup Data described in claim 27 or 28, it is characterized in that, described the first format conversion unit, comprising:
First reads subelement, for the described data that will back up that described the second data capture unit is chosen, reads internal memory;
The first format conversion subelement, for carrying out format conversion by the described data that will back up of internal memory according to default form.
The system of 30. Backup Datas according to claim 29, it is characterized in that, described first reads subelement, for the database execution architecture query language query manipulation at the described data place that will back up by described the second data capture unit is chosen, the described data that will back up is read to internal memory.
The system of 31. Backup Datas according to claim 27, is characterized in that, described the second copied cells, also packs for the picture that will back up, and the described picture reproduction after packing is arrived to backup directory.
The system of 32. 1 kinds of restoring datas, is characterized in that, comprising:
The 3rd authority acquiring unit, for obtaining system ROOT authority;
The 3rd data capture unit, for obtaining Backup Data;
The 3rd copied cells, for copying to system original directory by described Backup Data.
The system of 33. restoring datas according to claim 32, is characterized in that, described the 3rd authority acquiring unit is for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of contact person and/or message registration; Wherein
Described the 3rd copied cells, for copying to system directory/data/data/com.android.providers.contacts/databases by the Backup Data of contact person and/or message registration.
The system of 34. restoring datas according to claim 32, is characterized in that, described the 3rd authority acquiring unit is for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of contact head image; Wherein
Described the 3rd copied cells, for copying to system directory/data/data/com.android.providers.contacts/files/photos by the Backup Data of contact head image.
The system of 35. restoring datas according to claim 34, it is characterized in that, described the 3rd copied cells, for the Backup Data of contact head image is unpacked, and the Backup Data of the described contact head image after unpacking is copied to system directory/data/data/com.android.providers.contacts/files/photos.
The system of 36. restoring datas according to claim 32, is characterized in that, described the 3rd authority acquiring unit is for obtaining the ROOT authority of Android operating system; Described Backup Data comprises the Backup Data of note and/or multimedia message;
Wherein, described the 3rd copied cells, for copying to system directory/data/data/com.android.providers.telephony/databases by the Backup Data of note and/or multimedia message.
The system of 37. 1 kinds of restoring datas, is characterized in that, comprising:
The 4th authority acquiring unit, for obtaining system ROOT authority;
The 4th data capture unit, for obtaining Backup Data;
The second format conversion unit, is converted into the compatible form of current system for the described Backup Data that described the 4th data capture unit is chosen;
The 4th copied cells, for copying to system original directory by the described Backup Data that is converted into described form.
38. according to the system of the restoring data described in claim 37, it is characterized in that, described the 4th authority acquiring unit, for obtaining the ROOT authority of Android operating system; The described data that will back up, comprise contact person, contact head image, message registration, note and/or multimedia message.
39. according to the system of the restoring data described in claim 37 or 38, it is characterized in that, described the second format conversion unit, comprising:
Second reads subelement, for the described Backup Data of choosing is read to internal memory;
The second format conversion subelement, for being converted into the compatible form of current system by the described Backup Data of internal memory.
40. according to the system of the restoring data described in claim 37, it is characterized in that, described the 4th copied cells, comprising:
Write subelement, for the described Backup Data that is converted into described form is write to temporary file;
Replicon unit, for copying to system original directory by the described Backup Data of described temporary file.
41. according to the system of the restoring data described in claim 40, it is characterized in that, said write subelement, for by writing temporary file by the described Backup Data execution architecture query language update that is converted into described form by described Backup Data.
42. according to the system of the restoring data described in claim 40 or 41, it is characterized in that, described replicon unit is also for the picture after packing is unpacked, and by the described picture reproduction after unpacking to system original directory.
CN201410310678.XA 2014-06-30 2014-06-30 Method and system for data backup and recovery Pending CN104050059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410310678.XA CN104050059A (en) 2014-06-30 2014-06-30 Method and system for data backup and recovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410310678.XA CN104050059A (en) 2014-06-30 2014-06-30 Method and system for data backup and recovery

Publications (1)

Publication Number Publication Date
CN104050059A true CN104050059A (en) 2014-09-17

Family

ID=51502950

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410310678.XA Pending CN104050059A (en) 2014-06-30 2014-06-30 Method and system for data backup and recovery

Country Status (1)

Country Link
CN (1) CN104050059A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293997A (en) * 2015-05-28 2017-01-04 四川效率源信息安全技术有限责任公司 Android device stays out of the method that SD card goes back original system and data
CN106503042A (en) * 2016-09-20 2017-03-15 青岛海信移动通信技术股份有限公司 A kind of abnormal restoring method of associated person information and device
CN106681859A (en) * 2016-11-25 2017-05-17 青岛海信移动通信技术股份有限公司 Short message restoration method and device
CN107402845A (en) * 2017-07-17 2017-11-28 合肥执念网络科技有限公司 A kind of computer data and system reducing system
CN111241005A (en) * 2020-01-09 2020-06-05 杭州涂鸦信息技术有限公司 Key value pair-based safe partition storage method and system
WO2021233351A1 (en) * 2020-05-19 2021-11-25 中兴通讯股份有限公司 Data transfer method and device, and terminal and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783025A (en) * 2004-12-03 2006-06-07 华为技术有限公司 Embedded system data back-up device and method
CN101247589A (en) * 2007-07-04 2008-08-20 华为技术有限公司 Mobile terminal data conversion/backup method, device and system
CN102591727A (en) * 2012-01-04 2012-07-18 华为终端有限公司 Method for processing application data and computing node
CN102882923A (en) * 2012-07-25 2013-01-16 北京亿赛通科技发展有限责任公司 Secure storage system and method for mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783025A (en) * 2004-12-03 2006-06-07 华为技术有限公司 Embedded system data back-up device and method
CN101247589A (en) * 2007-07-04 2008-08-20 华为技术有限公司 Mobile terminal data conversion/backup method, device and system
CN102591727A (en) * 2012-01-04 2012-07-18 华为终端有限公司 Method for processing application data and computing node
CN102882923A (en) * 2012-07-25 2013-01-16 北京亿赛通科技发展有限责任公司 Secure storage system and method for mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DAN DASCALESCU: "Android Users Howto Wiki", 《HTTPS://WIKI.DANDASCALESCU.COM/HOWTOS/ANDROID#HOW_TO_BACKUP_ANDROID_SMSES.2C_MMSES.2C_CONTACTS.2C_CALL_LOGS.2C_USER_DICTIONARY_ETC._MANUALLY》 *
广武叹12315: "android通讯录头像存在哪个文件夹里", 《HTTP://ZHIDAO.BAIDU.COM/QUESTION/495386148621420564.HTML?FR=IKS&WORD=ANDROID+%C1%AA%CF%B5%C8%CB%CD%B7%CF%F1&IE=GBK》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293997A (en) * 2015-05-28 2017-01-04 四川效率源信息安全技术有限责任公司 Android device stays out of the method that SD card goes back original system and data
CN106503042A (en) * 2016-09-20 2017-03-15 青岛海信移动通信技术股份有限公司 A kind of abnormal restoring method of associated person information and device
CN106681859A (en) * 2016-11-25 2017-05-17 青岛海信移动通信技术股份有限公司 Short message restoration method and device
CN106681859B (en) * 2016-11-25 2021-01-22 青岛海信移动通信技术股份有限公司 Short message recovery method and device
CN107402845A (en) * 2017-07-17 2017-11-28 合肥执念网络科技有限公司 A kind of computer data and system reducing system
CN111241005A (en) * 2020-01-09 2020-06-05 杭州涂鸦信息技术有限公司 Key value pair-based safe partition storage method and system
WO2021233351A1 (en) * 2020-05-19 2021-11-25 中兴通讯股份有限公司 Data transfer method and device, and terminal and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN104050059A (en) Method and system for data backup and recovery
US7631158B2 (en) Disk snapshot method using a copy-on-write table in a user space
US11263194B2 (en) File block addressing for backups
AU2012347883B2 (en) System and method for restoring application data
CN109634774B (en) Data backup and recovery method and device
CN104216801B (en) The data copy method and system of a kind of Virtual environment
CN106354525B (en) Application software installation kit difference storage method and system
US8983899B1 (en) Systems and methods for archiving files in distributed replication environments
US20140236902A1 (en) User Data Backup Method and Apparatus
EP2972749A1 (en) Data storage volume having tiers of different storage traits
CN102819442A (en) Method and system for programming programs into embedded equipment program
US20160026674A1 (en) Apparatus and method for fsync system call processing using ordered mode journaling with file unit
JP6239744B2 (en) Data column encryption apparatus and method
CN112069468B (en) Page dynamic watermark method and device
CN103218428A (en) Dynamic link method and system
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
CN104063284A (en) Method and device operating application program
CN105260271A (en) HDFS snapshot implementation method and system
CN101727504A (en) Method and device for migrating data of file system
CN105302488A (en) Data writing method and system for storage system
CN104331311B (en) A kind of AKU generation method and device
WO2016080949A1 (en) Snapshot backup
CA2930061A1 (en) Variants of files in a file system
CN100365572C (en) Software packaging method
US10146467B1 (en) Method and system for archival load balancing

Legal Events

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

Application publication date: 20140917