CN112230947B - Operating system upgrade method and upgrade system - Google Patents
Operating system upgrade method and upgrade system Download PDFInfo
- Publication number
- CN112230947B CN112230947B CN201910579233.4A CN201910579233A CN112230947B CN 112230947 B CN112230947 B CN 112230947B CN 201910579233 A CN201910579233 A CN 201910579233A CN 112230947 B CN112230947 B CN 112230947B
- Authority
- CN
- China
- Prior art keywords
- file
- custom
- directory
- application
- data
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请提供一种操作系统的升级方法、系统,包括:获取升级前需要保留的系统数据的位置清单;获取用户安装的应用程序清单;根据所述数据位置将所述系统数据备份至临时区域;根据所述应用程序清单备份所述应用程序;进行系统升级,恢复所述系统数据,并根据备份的数据完成各个应用程序的配置。
The present application provides an operating system upgrade method and system, including: obtaining a location list of system data that needs to be retained before upgrading; obtaining a list of applications installed by a user; backing up the system data to a temporary area according to the data location; backing up the applications according to the application list; performing a system upgrade, restoring the system data, and completing the configuration of each application according to the backed-up data.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an upgrade method of an operating system.
Background
With the development of social technology, people almost every day can make a way with a computer, and an operating system is used as a carrier for interaction between computer equipment and users and plays an extremely important role. In the current society, computer technology is in a high-speed development stage, and in daily application, in order to timely use the latest functions of application programs or timely defend bad carriers such as Trojan horse, virus, garbage software and the like, version upgrading or updating of an operating system is often required. Once the operating system is upgraded, the user data before the upgrade and the application program installed by the user should be guaranteed to be used normally.
In the existing system upgrading technology, a scheme of thoroughly clearing data and applications in an old operating system is adopted, so that the applications in the upgraded or updated operating system cannot conflict with the old version. The proposal has the advantages of ensuring that the upgraded or updated operating system and application can normally run, and avoiding the problem of unmatched legacy data and application. However, the user experience of this scheme is poor, because after upgrading or updating the system, some convenient operations and marks before the user are also cleared, the user data application program is completely deleted, the user needs to reconfigure data and reinstall the required application program, and the new system environment is readjusted, which causes great inconvenience to the user. The other upgrading mode adopts a direct package installation mode, all user data and application data before upgrading are reserved, and the scheme has the advantages that all data of a user cannot be lost, but only cannot be lost, and normal use of an application program cannot be guaranteed. For example, if the related library version of the updated system is too high, and is inconsistent with the library version on which the user self-installed application program depends, the retained user application program is not available, and the user experience is poor.
Disclosure of Invention
The invention aims to provide an upgrading method of an operating system, which solves the problem that an application program cannot normally run after the system is upgraded in the prior art.
In order to solve the above problems, the present application discloses an upgrade method of an operating system, comprising:
acquiring a position list of system data to be reserved before upgrading;
Acquiring an application program list installed by a user;
backing up the system data to a temporary area according to the data position;
backing up the application program and the link library according to the application program list;
and carrying out system upgrading, recovering the system data, and completing the configuration of each application program according to the backed-up data.
In a preferred embodiment, a list of locations for system data that needs to be maintained is validated based on locations defined by standard data and dynamic data locations.
In a preferred embodiment, the step of backing up the application and the link library according to the application list includes:
backing up the related files of each application program to the corresponding custom directory;
Analyzing related files of each application program, analyzing and obtaining a link library corresponding to the application program, and storing the application program and the link library into the custom directory;
Generating an encapsulation script by using the executable file corresponding to the application program link library;
And cleaning the related files and library catalogs of each application program in the system.
In a preferred embodiment, the step of parsing the related file of each application program includes:
The custom directory comprises a custom file directory and a custom library directory;
judging the type of the related file:
If the file is a common file, directly backing up the file to the custom file directory;
if the file is a link file, copying the file corresponding to the link, and creating a corresponding link under the custom file directory;
If the file is an executable file, backing up a dependent link library to the custom library catalog, generating a corresponding encapsulation script, and exporting a link path to the custom library catalog;
modifying the initiator file and directing the executable program to the encapsulation script.
In a preferred embodiment, the method further comprises the step of overlaying all relevant files under the custom directory into a system, and executing the encapsulation script generated by the executable file.
In a preferred embodiment, the custom directories corresponding to the respective applications are created under a backup directory.
In a preferred embodiment, the user's application manifest is obtained by means of diff.
In a preferred embodiment, the step of completing the configuration of each application program according to the encapsulation script includes overlaying all relevant files under the custom directory into the system, and executing the encapsulation script generated by the executable file.
The application also discloses an upgrade system of the operating system, which comprises:
The position list acquisition module is configured to acquire a position list of system data to be reserved before upgrading;
The application program list acquisition module is configured to acquire an application program list installed by a user;
the first backup module is configured to backup the system data to a temporary area according to the data position;
the second backup module is configured to backup the application program according to the application program list;
And the upgrading module is configured to upgrade the system, recover the system data and complete the configuration of each application program according to the backed-up data.
The application also discloses an upgrade device of the operating system, which comprises:
a memory for storing computer executable instructions, and
A processor coupled with the memory for implementing steps in a method as described previously when executing the computer-executable instructions.
The application also discloses a computer readable storage medium having stored therein computer executable instructions which when executed by a processor implement the steps in the method as described above.
Compared with the prior art, the method has the following beneficial effects:
The method can verify whether the user data and the application programs are complete backup and migration by executing the program and using the operating system, and provides a system, complete and safe protection scheme for the upgrade of the operating system.
The numerous technical features described in the description of the present application are distributed among the various technical solutions, which can make the description too lengthy if all possible combinations of technical features of the present application (i.e., technical solutions) are to be listed. In order to avoid this problem, the technical features disclosed in the above summary of the application, the technical features disclosed in the following embodiments and examples, and the technical features disclosed in the drawings may be freely combined with each other to constitute various new technical solutions (which should be regarded as having been described in the present specification) unless such a combination of technical features is technically impossible. For example, in one example, feature a+b+c is disclosed, in another example, feature a+b+d+e is disclosed, and features C and D are equivalent technical means that perform the same function, technically only by alternative use, and may not be adopted simultaneously, feature E may be technically combined with feature C, and then the solution of a+b+c+d should not be considered as already described because of technical impossibility, and the solution of a+b+c+e should be considered as already described.
Drawings
FIG. 1 is a flow chart of a method for operating system upgrade in an embodiment of the present invention.
FIG. 2 illustrates a block diagram of an operating system upgrade apparatus in one embodiment of the invention.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. It will be understood by those skilled in the art that the claimed application may be practiced without these specific details and with various changes and modifications from the embodiments that follow.
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, in one embodiment of the present application, a secure upgrade method for an operating system is disclosed, and the upgrade method for an operating system described in this embodiment may be applied to a computer capable of running multiple types of operating systems, such as a Linux operating system, an XP operating system, a VISTA operating system, a WIN7 operating system, a WIN8 operating system, a WIN8.1 operating system, a WIN10 operating system, and the like. The method comprises the following steps:
In step 101, a location list of system data to be maintained before upgrade is obtained. In one embodiment of the application, a list of locations of data is validated based on locations defined by standard data and dynamic data locations. For example, the conventional Linux operating system has a relatively clear location directory definition for user data, such as a home directory of a user, and the configuration of dynamic data is performed in advance by a file system superposition mode, and the location information of a data list to be reserved is confirmed by combining the two, wherein the location information is located at a location which is not attributed to the conventional standard data definition, such as network configuration information under/etc/NetworkManager/network connection data, print configuration data under/etc/caps, and the like, by using a file system information storage mode after superposition.
In step 102, a list of applications installed by a user is obtained. In one embodiment, the user's application manifest is obtained by diff means, such as a picture viewer, QQ, weChat, PDF reader, etc.
In step 103, the system data is backed up to a temporary area according to the data location.
In step 104, the application program is backed up according to the application program list.
Specifically, the step of backing up the application according to the application list includes:
firstly, relevant files and library catalogs of each application program are backed up to corresponding custom catalogs, the custom catalogs corresponding to each application program are created under the backup catalogs, for example, under the/opt catalogs, and the custom catalogs comprise custom file catalogs and custom library catalogs.
And then, analyzing relevant files of each application program, analyzing and obtaining an application program link library, and storing the application program link library into the custom directory.
The method comprises the steps of analyzing specific files installed to a system according to a software package of a target application program, directly backing up the files under a custom file directory if the files are common files, copying actual files corresponding to links and creating corresponding links under the custom file directory if the files are link files, backing up a link LIBRARY displayed by ldd to the custom LIBRARY directory if the files are executable files ELF, generating a package script, deriving a link PATH of the custom LIBRARY directory to LD_LIBRARY_PATH, modifying an Exec field value in a starter file, and pointing an executable program to the package script.
For example, taking a picture viewer as an example, analyze the file lists of this software package, save these file lists to a system-reserved directory, where/usr/bin/eog is an executable file and is formatted as an ELF, parse its dependency link LIBRARY, backup the LIBRARY file to directory/opt/updateeog/eog, export the PATH to ld_libry_path, encapsulate script file wrapper-eog, and modify Exec field exec= eog% U in the original initiator file to exec=wrapper-eog% U.
And then, analyzing the related files in the custom catalogs corresponding to the application programs and postinst encapsulation scripts of the library catalogs, and if a link file is created, extracting the executable files corresponding to the application program link library to generate the encapsulation scripts, wherein the encapsulation scripts comprise the executable files of the application programs and the files of the calling system.
And clearing system base library files in the backup library catalogue, such as libc libraries and the like.
Postinst package scripts of the application software package are extracted into the backup file directory.
In step 105, system upgrade is performed, the system data is recovered, and the configuration of each application program is completed according to the backed-up data. And overlaying all relevant files under the custom directory into a system, and executing postinst encapsulation scripts generated by the executable files.
Referring to fig. 2, the application also discloses an upgrade system of an operating system, which comprises:
A location list obtaining module 201 configured to obtain a location list of system data to be retained before upgrading;
An application manifest acquisition module 202 configured to acquire a user-installed application manifest;
a first backup module 203 configured to backup the system data to a temporary area according to the data location;
a second backup module 204 configured to backup the application according to the application list:
and the upgrading module 205 is configured to upgrade the system, restore the system data, and complete the configuration of each application program according to the backed-up data.
It should be noted that, those skilled in the art should understand that the implementation functions of the modules shown in the embodiments of the upgrade system of the operating system described above may be understood with reference to the related descriptions of the foregoing upgrade method. The functions of the modules shown in the above-described embodiments of the operating system upgrade system may be implemented by programs (executable instructions) running on the processor. The upgrade system of the operating system described above in accordance with embodiments of the present application may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the technical solutions of the embodiments of the present application may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The storage medium includes various media capable of storing program codes, such as a usb (universal serial bus), a removable hard disk, a Read Only Memory (ROM), a magnetic disk, and an optical disk. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
Accordingly, embodiments of the present application also provide a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement embodiments of the methods of the present application. Computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. The computer-readable storage medium, as defined herein, does not include a transient computer-readable medium.
In addition, the embodiment of the application also provides upgrading equipment of the operating system, which comprises a memory for storing computer executable instructions and a processor, wherein the processor is used for realizing the steps in the method embodiments when executing the computer executable instructions in the memory. The Processor may be a central processing unit (Central Processing Unit, abbreviated as "CPU"), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, abbreviated as "DSP"), application SPECIFIC INTEGRATED Circuit, application Specific Integrated Circuit (ASIC), etc. The aforementioned memory may be a read-only memory (ROM), a random access memory (random access memory RAM), a Flash memory (Flash), a hard disk, a solid state disk, or the like. The steps of the method disclosed in the embodiments of the present application may be directly embodied in a hardware processor for execution, or may be executed by a combination of hardware and software modules in the processor.
It should be noted that in the present patent application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. In the present patent application, if it is mentioned that an action is performed according to an element, it means that the action is performed according to at least the element, and includes both cases that the action is performed according to only the element and that the action is performed according to the element and other elements. Multiple, etc. expressions include 2, 2 times, 2, and 2 or more, 2 or more times, 2 or more.
All references mentioned in this specification are to be considered as being included in the disclosure of the application in its entirety so as to be applicable as a basis for modification when necessary. Furthermore, it should be understood that the foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present disclosure, is intended to be included within the scope of one or more embodiments of the present disclosure.
In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910579233.4A CN112230947B (en) | 2019-06-28 | 2019-06-28 | Operating system upgrade method and upgrade system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910579233.4A CN112230947B (en) | 2019-06-28 | 2019-06-28 | Operating system upgrade method and upgrade system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112230947A CN112230947A (en) | 2021-01-15 |
CN112230947B true CN112230947B (en) | 2025-04-11 |
Family
ID=74110910
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910579233.4A Active CN112230947B (en) | 2019-06-28 | 2019-06-28 | Operating system upgrade method and upgrade system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112230947B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115981685A (en) * | 2021-10-14 | 2023-04-18 | 华为技术有限公司 | Application upgrade method, device, computing device and chip system |
CN114398065B (en) * | 2022-03-24 | 2022-07-08 | Tcl通讯科技(成都)有限公司 | Micro front-end system updating method and device, electronic equipment and storage medium |
CN114995842B (en) * | 2022-08-01 | 2022-11-01 | 中科方德软件有限公司 | Method and device for installing operating system and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6513051B1 (en) * | 1999-07-16 | 2003-01-28 | Microsoft Corporation | Method and system for backing up and restoring files stored in a single instance store |
CN102521006A (en) * | 2012-01-09 | 2012-06-27 | 广州广电运通金融电子股份有限公司 | Hardware driving and medium program upgrading method of automatic equipment |
CN103186387A (en) * | 2011-12-27 | 2013-07-03 | 宏碁股份有限公司 | Electronic device and method for updating its operating system |
CN109408075A (en) * | 2018-10-19 | 2019-03-01 | 中影环球(北京)科技有限公司 | A kind of method and apparatus for retaining current business and carrying out remote upgrade |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI248579B (en) * | 2003-12-04 | 2006-02-01 | Wistron Corp | Method and system for restoring backup data |
-
2019
- 2019-06-28 CN CN201910579233.4A patent/CN112230947B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6513051B1 (en) * | 1999-07-16 | 2003-01-28 | Microsoft Corporation | Method and system for backing up and restoring files stored in a single instance store |
CN103186387A (en) * | 2011-12-27 | 2013-07-03 | 宏碁股份有限公司 | Electronic device and method for updating its operating system |
CN102521006A (en) * | 2012-01-09 | 2012-06-27 | 广州广电运通金融电子股份有限公司 | Hardware driving and medium program upgrading method of automatic equipment |
CN109408075A (en) * | 2018-10-19 | 2019-03-01 | 中影环球(北京)科技有限公司 | A kind of method and apparatus for retaining current business and carrying out remote upgrade |
Also Published As
Publication number | Publication date |
---|---|
CN112230947A (en) | 2021-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9645892B1 (en) | Recording file events in change logs while incrementally backing up file systems | |
US9411691B2 (en) | Virtual machine disaster recovery | |
AU2012347883B2 (en) | System and method for restoring application data | |
US9934104B2 (en) | Metadata generation for incremental backup | |
US10204016B1 (en) | Incrementally backing up file system hard links based on change logs | |
US11288126B2 (en) | Incremental backup with eventual name space consistency | |
CN112230947B (en) | Operating system upgrade method and upgrade system | |
US10127119B1 (en) | Systems and methods for modifying track logs during restore processes | |
US20150046401A1 (en) | File deletion detection in key value databases for virtual backups | |
US10275315B2 (en) | Efficient backup of virtual data | |
US9916324B2 (en) | Updating key value databases for virtual backups | |
US10108501B2 (en) | Terminal backup and recovery method | |
US10089190B2 (en) | Efficient file browsing using key value databases for virtual backups | |
US12105594B2 (en) | Creating file recipes for copy overwrite workloads in deduplication file systems | |
US8843450B1 (en) | Write capable exchange granular level recoveries | |
US8671075B1 (en) | Change tracking indices in virtual machines | |
CN108038028B (en) | File backup method and device and file restoration method and device | |
US9864656B1 (en) | Key value databases for virtual backups | |
US11675516B2 (en) | Analyzing disk configuration from dynamic virtual disks | |
US10423494B2 (en) | Trimming unused blocks from a versioned image backup of a source storage that is stored in a sparse storage | |
CN113867768A (en) | Operating system processing method and device, electronic equipment and storage medium | |
US11797235B2 (en) | Interface to mount virtual disks from multiple sources | |
US11435927B2 (en) | Protected saveset volume movement via metadata bootstrap | |
CN106897588B (en) | Processing method and device of label function | |
US8849769B1 (en) | Virtual machine file level recovery |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |