CN111045712A - Single system upgrading method and system with backup function - Google Patents
Single system upgrading method and system with backup function Download PDFInfo
- Publication number
- CN111045712A CN111045712A CN201911298741.1A CN201911298741A CN111045712A CN 111045712 A CN111045712 A CN 111045712A CN 201911298741 A CN201911298741 A CN 201911298741A CN 111045712 A CN111045712 A CN 111045712A
- Authority
- CN
- China
- Prior art keywords
- partition
- upgraded
- backup
- single system
- upgrading
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000005192 partition Methods 0.000 claims abstract description 122
- 230000006870 function Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 abstract description 7
- 230000009471 action Effects 0.000 abstract description 3
- 238000011084 recovery Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a single system upgrading method with a backup function, which comprises the following steps: setting a backup partition in the single system; storing the mirror image content of the partition to be upgraded to the backup partition; erasing the partition to be upgraded; and upgrading the subarea to be upgraded. Compared with the prior art, the method and the device have the advantages that the upgrading content is written into the backup partition before the corresponding partition is upgraded every time, then the actual corresponding partition is updated, and therefore in the upgrading process, due to the fact that interruption occurs in an unexpected situation, the rebooting boot partition uboot can complete recovery processing actions. Therefore, the backup function can be realized during upgrading, and only one partition needs to be backed up each time. Backup a partition, upgrade a partition, backup a partition, and upgrade a partition. Therefore, the purpose of backing up all partition spaces can be achieved by using one backup partition space, all partitions to be upgraded do not need to be backed up at the same time, and the system space is saved.
Description
Technical Field
The application relates to the field of embedded system upgrading and updating, in particular to a single system upgrading method with a backup function.
Background
In an actual product, in order to repair some serious problems and vulnerabilities, it is often necessary to upgrade and update an online product, and the current embedded system upgrade method is as follows: after the firmware is acquired from the remote end, the system partition is directly updated and upgraded, and the method has the advantages of saving storage space and having the defects of no backup function and incomplete system caused by accidents (such as power failure) in the upgrading process, so that the machine runs abnormally.
Disclosure of Invention
The main objective of the present application is to provide a single system upgrade method with backup function, which includes:
s2: setting a backup partition in the single system;
s4: storing the mirror image content of the partition to be upgraded to the backup partition;
s6: erasing the partition to be upgraded;
s8: and upgrading the subarea to be upgraded.
Optionally, the single system upgrade method with the backup function further includes:
s0: after the single system is powered on, the boot region checks the integrity of all the partitions of the single system and restores the incomplete partitions.
Optionally, recovering the incomplete partition is: copy a copy from the backup partition into the incomplete partition and then reboot again.
Optionally, storing the image content of the partition to be upgraded to the backup partition is:
s41: extracting corresponding information of the subarea to be upgraded from the upgrading packet;
s42: and writing the mirror image content of the partition to be upgraded in the upgrade package into the backup partition according to the corresponding information.
Optionally, upgrading the partition to be upgraded comprises: and writing the mirror image content of the partition to be upgraded in the upgrade package into the partition to be upgraded.
Optionally, the single system upgrade method with the backup function further includes:
and after upgrading the partition to be upgraded, detecting whether a partition needing to be updated still exists, if so, repeating the steps S0 to S8, and if not, exiting.
According to another aspect of the present application, there is also provided a single system upgrade system with a backup function, including:
the setting module is used for setting a backup partition in the single system;
the storage module is used for storing the mirror image content of the partition to be upgraded to the backup partition;
the erasing module is used for erasing the partition to be upgraded;
and the upgrading module is used for upgrading the partition to be upgraded.
The application also discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of being executed by the processor, wherein the processor realizes the method of any one of the above items when executing the computer program.
The application also discloses a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements the method of any of the above.
The present application also discloses a computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
Compared with the prior art, the method has the following advantages:
before the corresponding partition is upgraded, the upgrade content is written into the backup partition, and then the actual corresponding partition is updated, so that in the upgrading process, if the interruption occurs in an unexpected situation, the rebooting boot partition uboot can complete the recovery processing action. Therefore, the backup function can be realized during upgrading, and only one partition needs to be backed up each time. Backup a partition, upgrade a partition, backup a partition, and upgrade a partition. Therefore, the purpose of backing up all partition spaces can be achieved by using one backup partition space, all partitions to be upgraded do not need to be backed up at the same time, and the system space is saved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a flowchart illustrating a single system upgrade method with backup functionality according to one embodiment of the present application;
FIG. 2 is a schematic flow chart diagram according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present application; and
FIG. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to fig. 1, an embodiment of the present application provides a single system upgrade method with a backup function, including:
s2: setting a backup partition in the single system;
s4: storing the mirror image content of the partition to be upgraded to the backup partition;
s6: erasing the partition to be upgraded;
s8: and upgrading the subarea to be upgraded.
Assuming that there are 5 partitions in the system, a backup partition (e.g., partition x) is set in the system as the 6 th partition, and the size of the space of partition x is not smaller than the size of the largest space partition among partitions 1-5. The purpose of this is to allow partition x to back up any of partitions 1-5. The mirrored content of the partition to be upgraded (e.g., partition 3) is then stored into partition x. Partition 3 is then erased and partition 3 is finally upgraded.
In an embodiment of the present application, the single system upgrading method with backup function further includes:
s0: after the single system is powered on, the boot region checks the integrity of all the partitions of the single system and restores the incomplete partitions.
In an embodiment of the present application, recovering an incomplete partition is: copy a copy from the backup partition into the incomplete partition and then reboot again.
Referring to fig. 2, in an embodiment of the present application, storing the mirror image content of the partition to be upgraded to the backup partition includes:
s41: extracting corresponding information of the subarea to be upgraded from the upgrading packet;
s42: and writing the mirror image content of the partition to be upgraded in the upgrade package into the backup partition according to the corresponding information.
In an embodiment of the present application, upgrading the partition to be upgraded includes: and writing the mirror image content of the partition to be upgraded in the upgrade package into the partition to be upgraded.
In an embodiment of the present application, the single system upgrading method with backup function further includes:
s10: and after upgrading the partition to be upgraded, detecting whether a partition needing to be updated still exists, if so, repeating the steps S0 to S8, and if not, exiting.
According to another aspect of the present application, there is also provided a single system upgrade system with a backup function, including:
the setting module is used for setting a backup partition in the single system;
the storage module is used for storing the mirror image content of the partition to be upgraded to the backup partition;
the erasing module is used for erasing the partition to be upgraded;
and the upgrading module is used for upgrading the partition to be upgraded.
The invention is realized by adopting a form of time-to-space conversion, firstly, the structural form of the system partition is seen, and on the basis of a common single system, a backup partition is additionally added for temporarily backing up the partition, and the size of the space of the backup partition is consistent with the maximum partition in a system partition x (x is 1 to n), so that the backup function is met and the occupation of the storage space is reduced as much as possible.
In summary, before the corresponding partition is upgraded, the upgrade content is written into the backup partition, and then the actual corresponding partition is updated, so that in the upgrade process, if an unexpected interrupt occurs, the reboot boot partition uboot completes the recovery processing action. The time spent in the whole upgrading process is doubled compared with the time spent in the original single system, and the time is used for replacing the space.
Referring to fig. 3, the present application further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of the above methods when executing the computer program.
Referring to fig. 4, a computer-readable storage medium, a non-volatile readable storage medium, having stored therein a computer program which, when executed by a processor, implements any of the methods described above.
A computer program product comprising computer readable code which, when executed by a computer device, causes the computer device to perform the method of any of the above.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A single system upgrading method with a backup function is characterized by comprising the following steps:
s2: setting a backup partition in the single system;
s4: storing the mirror image content of the partition to be upgraded to the backup partition;
s6: erasing the partition to be upgraded;
s8: and upgrading the subarea to be upgraded.
2. The single system upgrade method with backup function according to claim 1, wherein the single system upgrade method with backup function further comprises:
s0: after the single system is powered on, the boot region checks the integrity of all the partitions of the single system and restores the incomplete partitions.
3. The single system upgrade method with backup function according to claim 2, wherein recovering the incomplete partition is: copy a copy from the backup partition into the incomplete partition and then reboot again.
4. The single system upgrade method with backup function according to claim 3, wherein storing the image content of the partition to be upgraded to the backup partition is:
s41: extracting corresponding information of the subarea to be upgraded from the upgrading packet;
s42: and writing the mirror image content of the partition to be upgraded in the upgrade package into the backup partition according to the corresponding information.
5. The single system upgrade method with backup function according to claim 4, wherein upgrading the partition to be upgraded is: and writing the mirror image content of the partition to be upgraded in the upgrade package into the partition to be upgraded.
6. The single system upgrade method with backup function according to claim 5, wherein the single system upgrade method with backup function further comprises:
and after upgrading the partition to be upgraded, detecting whether a partition needing to be updated still exists, if so, repeating the steps S0 to S8, and if not, exiting.
7. A single system upgrade system with backup functionality, comprising:
the setting module is used for setting a backup partition in the single system;
the storage module is used for storing the mirror image content of the partition to be upgraded to the backup partition;
the erasing module is used for erasing the partition to be upgraded;
and the upgrading module is used for upgrading the partition to be upgraded.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable by the processor, wherein the processor implements the method of any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, a non-transitory readable storage medium, having stored therein a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1-6.
10. A computer program product comprising computer readable code that, when executed by a computer device, causes the computer device to perform the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911298741.1A CN111045712A (en) | 2019-12-17 | 2019-12-17 | Single system upgrading method and system with backup function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911298741.1A CN111045712A (en) | 2019-12-17 | 2019-12-17 | Single system upgrading method and system with backup function |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111045712A true CN111045712A (en) | 2020-04-21 |
Family
ID=70236952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911298741.1A Pending CN111045712A (en) | 2019-12-17 | 2019-12-17 | Single system upgrading method and system with backup function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111045712A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694608A (en) * | 2020-06-08 | 2020-09-22 | 北京百度网讯科技有限公司 | System upgrading method and device for terminal equipment, electronic equipment and terminal equipment |
CN113050965A (en) * | 2021-03-12 | 2021-06-29 | 成都国科微电子有限公司 | Embedded system upgrading method, device, equipment and medium |
CN113190245A (en) * | 2021-04-13 | 2021-07-30 | 佳格科技(浙江)股份有限公司 | Multi-backup system upgrading method |
CN113641382A (en) * | 2021-07-27 | 2021-11-12 | 瑞芯微电子股份有限公司 | Partitionable system updating method and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193603A (en) * | 2017-05-25 | 2017-09-22 | 绵阳美菱软件技术有限公司 | The upgrade method and device of a kind of intelligent appliance |
CN107333181A (en) * | 2017-08-11 | 2017-11-07 | 四川长虹电器股份有限公司 | Linux system intelligent television software upgrade method |
CN109032632A (en) * | 2018-07-13 | 2018-12-18 | 深圳高新兴物联科技有限公司 | A kind of FOTA upgrade method, wireless communication terminal and storage medium |
CN109032649A (en) * | 2018-07-23 | 2018-12-18 | 青岛海信移动通信技术股份有限公司 | OTA upgrade method, device, equipment and storage medium |
CN109558160A (en) * | 2017-09-26 | 2019-04-02 | 阿里巴巴集团控股有限公司 | Upgrade method, embedded system |
CN109634645A (en) * | 2018-12-28 | 2019-04-16 | 深圳市有方科技股份有限公司 | Firmware upgrade method and terminal |
CN110399152A (en) * | 2019-07-22 | 2019-11-01 | 浙江鸿泉车联网有限公司 | A kind of device systems double copies upgrade method and device |
-
2019
- 2019-12-17 CN CN201911298741.1A patent/CN111045712A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107193603A (en) * | 2017-05-25 | 2017-09-22 | 绵阳美菱软件技术有限公司 | The upgrade method and device of a kind of intelligent appliance |
CN107333181A (en) * | 2017-08-11 | 2017-11-07 | 四川长虹电器股份有限公司 | Linux system intelligent television software upgrade method |
CN109558160A (en) * | 2017-09-26 | 2019-04-02 | 阿里巴巴集团控股有限公司 | Upgrade method, embedded system |
CN109032632A (en) * | 2018-07-13 | 2018-12-18 | 深圳高新兴物联科技有限公司 | A kind of FOTA upgrade method, wireless communication terminal and storage medium |
CN109032649A (en) * | 2018-07-23 | 2018-12-18 | 青岛海信移动通信技术股份有限公司 | OTA upgrade method, device, equipment and storage medium |
CN109634645A (en) * | 2018-12-28 | 2019-04-16 | 深圳市有方科技股份有限公司 | Firmware upgrade method and terminal |
CN110399152A (en) * | 2019-07-22 | 2019-11-01 | 浙江鸿泉车联网有限公司 | A kind of device systems double copies upgrade method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694608A (en) * | 2020-06-08 | 2020-09-22 | 北京百度网讯科技有限公司 | System upgrading method and device for terminal equipment, electronic equipment and terminal equipment |
CN113050965A (en) * | 2021-03-12 | 2021-06-29 | 成都国科微电子有限公司 | Embedded system upgrading method, device, equipment and medium |
CN113190245A (en) * | 2021-04-13 | 2021-07-30 | 佳格科技(浙江)股份有限公司 | Multi-backup system upgrading method |
CN113641382A (en) * | 2021-07-27 | 2021-11-12 | 瑞芯微电子股份有限公司 | Partitionable system updating method and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111045712A (en) | Single system upgrading method and system with backup function | |
CN106095620B (en) | A kind of development approach of built-in Linux partition holding | |
EP2375323A1 (en) | Firmware image update and management | |
CN109634645B (en) | Firmware upgrading method and terminal | |
US8468389B2 (en) | Firmware recovery system and method of baseboard management controller of computing device | |
US9652328B2 (en) | Restoring an application from a system dump file | |
EP2652599B1 (en) | System reset | |
US20110320794A1 (en) | Flash System And Method For Updating The Flash System | |
CN109032632B (en) | FOTA upgrading method, wireless communication terminal and storage medium | |
CN104572229A (en) | Firmware upgrade method and firmware upgrade device for embedded system | |
CN106775610B (en) | Electronic equipment starting method and electronic equipment | |
JP2010079440A (en) | Device and method for updating firmware | |
CN110874237A (en) | Software upgrading method, device, terminal and readable storage medium | |
CN113050965A (en) | Embedded system upgrading method, device, equipment and medium | |
CN106933604A (en) | A kind of method for upgrading system and device | |
JP6073710B2 (en) | Information processing apparatus, automatic recovery method from startup failure, and automatic recovery program from startup failure | |
CN101571817A (en) | Mainboard as well as recovering method and startup method of basic input output system thereof | |
CN115658152A (en) | Firmware upgrading method, firmware, electronic device and computer readable storage medium | |
CN107967275B (en) | Data processing method and device in relational database | |
US8918582B2 (en) | Simulating EEPROM in virtual distributed switches | |
CN111258617A (en) | Electronic equipment | |
KR102142905B1 (en) | Automatic Restoring Method of User File System in Communication Terminal | |
CN117555729A (en) | Automatic backup and recovery method for system, terminal equipment and storage medium | |
CN117389598A (en) | Configuration update reinforcement method, device, electronic equipment and storage medium | |
CN113645046A (en) | Network card driver installation method, main server and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200421 |