CN112230947A - An operating system upgrade method and upgrade system - Google Patents
An operating system upgrade method and upgrade system Download PDFInfo
- Publication number
- CN112230947A CN112230947A CN201910579233.4A CN201910579233A CN112230947A CN 112230947 A CN112230947 A CN 112230947A CN 201910579233 A CN201910579233 A CN 201910579233A CN 112230947 A CN112230947 A CN 112230947A
- Authority
- CN
- China
- Prior art keywords
- file
- directory
- application
- data
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
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 a method and system for upgrading an operating system, including: obtaining a list of locations of system data to be retained before upgrading; obtaining a list of application programs installed by a user; backing up the system data to a temporary area according to the data location; The application program is backed up according to the application program list; the system is upgraded, the system data is restored, and the configuration of each application program is completed 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 for an operating system.
Background
With the development of social science and technology, people almost daily get into contact with computers, and an operating system serves as a carrier for interaction between computer equipment and users and plays an extremely important role. Computer technology in modern society is in a high-speed development stage, and in daily application, version upgrading or updating of an operating system is often required in order to use the latest functions of an application program in time or in order to defend against bad carriers such as trojans, viruses and junk software in time. Once the operating system is upgraded, the user data before the upgrade and the application installed by the user should be guaranteed to be used normally.
In the existing system upgrading technology, one scheme is to adopt a complete clearing scheme for data and applications in an old operating system, so as to ensure that the applications in the upgraded or updated operating system do not conflict with the old version. The scheme has the advantages that the normal operation of the upgraded or updated operating system and application can be ensured, and the problem that the legacy data and the application are not matched is avoided. However, the user experience of this solution is poor, because some previous convenient operations and flags of the user are also removed after the system is upgraded or updated, the user data application program is completely deleted, the user needs to reconfigure data and reinstall the required application program, and re-adapt to a new system environment, which causes great inconvenience to the user. The other upgrading mode adopts a mode of directly installing the package, all user data and application data before upgrading can be reserved, and the scheme has the advantage 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 version of the library associated with the upgraded system is too high and is inconsistent with the version of the library that the user's self-installed application depends on, the retained user application 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 a system is upgraded in the prior art.
In order to solve the above problem, the present application discloses an upgrade method of an operating system, including:
acquiring a position list of system data needing 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 upgrading the system, recovering the system data, and completing the configuration of each application program according to the backed-up data.
In a preferred embodiment, the list of locations of system data that need to be retained is validated against the locations defined by the standard data and the dynamic data locations.
In a preferred embodiment, the step of backing up the application and the linked library according to the application manifest includes:
backing up related files of each application program to a corresponding custom directory;
analyzing the relevant files of each application program, analyzing to obtain a link library corresponding to the application program, and storing the application program and the link library to the user-defined directory;
generating an executable file corresponding to the application program link library into a packaging script;
and clearing the related files and library directories of all the application programs in the system.
In a preferred embodiment, the step of parsing the relevant file of each application includes:
the user-defined directory comprises a user-defined file directory and a user-defined 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 the link file, copying the file corresponding to the link, and creating a corresponding link under the user-defined file directory;
if the file is an executable file, backing up a dependent link library to the user-defined library directory, generating a corresponding packaging script, and exporting a link path to the user-defined library directory;
and modifying the starter file and pointing the executable program to the packaging script.
In a preferred embodiment, the method further comprises the following steps: and covering all related files under the user-defined directory in a system, and executing the packaging script generated by the executable file.
In a preferred embodiment, the customized directory corresponding to each application program is created under the backup directory.
In a preferred embodiment, the user's application manifest is obtained by diff.
In a preferred embodiment, the step of completing the configuration of each application according to the package script comprises: and covering all related files under the user-defined directory into the system, and executing the package script generated by the executable file.
The application also discloses an upgrade system of an operating system, comprising:
the position list acquisition module is configured to acquire a position list of system data needing 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 an operating system, comprising:
a memory for storing computer executable instructions; and
a processor, coupled with the memory, for implementing the steps in the method as described above when executing the computer-executable instructions.
The present 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 program are completely backed up and migrated or not by executing the program and using the operating system, and provides a systematic, complete and safe protection scheme for the upgrading of the operating system.
The present specification describes a number of technical features distributed throughout the various technical aspects, and if all possible combinations of technical features (i.e. technical aspects) of the present specification are listed, the description is made excessively long. In order to avoid this problem, the respective technical features disclosed in the above summary of the invention of the present application, the respective technical features disclosed in the following embodiments and examples, and the respective 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 the technical features is technically infeasible. For example, in one example, the feature a + B + C is disclosed, in another example, the feature a + B + D + E is disclosed, and the features C and D are equivalent technical means for the same purpose, and technically only one feature is used, but not simultaneously employed, and the feature E can be technically combined with the feature C, then the solution of a + B + C + D should not be considered as being described because the technology is not feasible, and the solution of a + B + C + E should be considered as being described.
Drawings
FIG. 1 is a flow chart illustrating an operating system upgrade method according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating an operating system upgrade device in an embodiment of the invention.
Detailed Description
In the following description, numerous technical details are set forth in order to provide a better understanding of the present application. However, it will be understood by those skilled in the art that the technical solutions claimed in the present application can be implemented without these technical details and with various changes and modifications based on the following embodiments.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, in an embodiment of the present application, a method for safely upgrading an operating system is disclosed, and the method for upgrading an operating system according to this embodiment may be applied to a computer capable of running multiple types of operating systems, for example, 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 that needs to be retained before upgrading is obtained. In one embodiment of the application, the location manifest of the data is validated against the locations defined by the standard data and the dynamic data locations. For example, a conventional Linux operating system has a relatively clear location directory definition for user data, such as a home directory of a user, and the like, and the configuration of dynamic data is to acquire network configuration information, network connection data, print configuration data and the like at/etc/cups/locations which are not included in the conventional standard data definition location, such as/etc/network manager/by using a file system information storage manner after being superimposed in advance, and to confirm the location information of a data list to be retained by combining the two.
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, such as a picture viewer, a QQ, a WeChat, a PDF reader, and so on.
In step 103, the system data is backed up to a temporary area according to the data location.
And step 104, backing up the application program according to the application program list.
Specifically, the step of backing up the application program according to the application program list includes:
firstly, the related files and library directories of each application program are backed up to the corresponding custom directory, the custom directory corresponding to each application program is created under the backup directory, for example, under the/opt directory, and the custom directory comprises the custom file directory and the custom library directory.
And then, analyzing the related files of each application program, analyzing to obtain an application program link library, and storing the application program link library to the user-defined directory.
The step of analyzing the relevant files of each application program comprises the following steps: analyzing a specific file installed in the system according to a software package of a target application program, and if the specific file is a common file, directly backing up the file to the custom file directory; if the file is a link file, copying an actual file corresponding to the link, and creating a corresponding link under the user-defined file directory; if the file is an executable file ELF, backing up the link LIBRARY displayed by the ldd to the user-defined LIBRARY directory, generating a packaging script, and exporting a link PATH of the user-defined LIBRARY directory to LD _ LIBRARY _ PATH; and modifying an Exec field value in the launcher file, and pointing the executable program to the packaging script.
For example, taking a picture viewer as an example, the file list of the software package is analyzed, the file list is saved to a system reserved directory, wherein/usr/bin/eog is an executable file and is in an ELF format, a dependent link LIBRARY of the executable file is analyzed, the LIBRARY file is backed up to a directory/opt/updateog/eog, the PATH is exported to an LD _ LIBRARY _ PATH, a script file wrapper-eog is packaged, and the Exec field Exec eog% U in the original launcher file is modified into Exec wrapper-eog% U.
And then analyzing relevant files in the user-defined directory corresponding to each application program and the postscript of the library directory, if a link file is created, extracting an executable file corresponding to the application program link library to generate a package script, wherein the package script comprises the executable file of the application program and a file of a calling system.
And clearing system basic library files in the backup library directory, such as libc library and the like.
The postscript encapsulation script of the application package is extracted into the back-up file directory.
In step 105, system upgrade is performed, the system data is restored, and configuration of each application program is completed according to the backed-up data. And overlaying all related files under the custom directory into the system, and executing the postenst packaging script generated by the executable file.
Referring to fig. 2, the present application further discloses an upgrade system of an operating system, including:
a location list obtaining module 201 configured to obtain a location list of system data that needs to be retained before upgrading;
an application program list acquisition module 202 configured to acquire an application program list installed by a user;
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 manifest:
the upgrade module 205 is configured to perform system upgrade, recover the system data, and complete configuration of each application program according to the backed-up data.
It should be noted that, as will be understood by those skilled in the art, the implementation functions of the modules shown in the embodiment of the upgrade system of the operating system described above can be understood by referring to the description related to the upgrade method described above. The functions of the respective modules shown in the embodiment of the upgrade system of the operating system described above may be realized by a program (executable instructions) running on a processor. The upgrade system of the operating system according to the embodiment of the present application may also be stored in a computer-readable storage medium if it is implemented in the form of a software function module and sold or used as an independent product. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, and an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Accordingly, the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions implement the method embodiments 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable storage medium does not include a transitory computer-readable medium.
In addition, the embodiment of the application also provides an upgrading device of an operating system, which comprises a memory for storing computer executable instructions and a processor; the processor is configured to implement the steps of the method embodiments described above when executing the computer-executable instructions in the memory. The Processor may be a Central Processing Unit (CPU), other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. The aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a Flash memory (Flash), a hard disk, or a solid state disk. The steps of the method disclosed in the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
It is 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. Also, 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, the use of the verb "comprise a" to define an element does not exclude the presence of another, same element in a process, method, article, or apparatus that comprises the element. In the present patent application, if it is mentioned that a certain action is executed according to a certain element, it means that the action is executed according to at least the element, and two cases are included: performing the action based only on the element, and performing the action based on the element and other elements. The expression of a plurality of, a plurality of and the like includes 2, 2 and more than 2, more than 2 and more than 2.
All documents mentioned in this specification are to be considered as being incorporated in their entirety into the disclosure of the present application so as to be subject to modification as necessary. It should be understood that the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present disclosure should be included in the scope of protection of one or more embodiments of the present disclosure.
In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
Claims (10)
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 true CN112230947A (en) | 2021-01-15 |
CN112230947B 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) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114398065A (en) * | 2022-03-24 | 2022-04-26 | Tcl通讯科技(成都)有限公司 | Micro front-end system updating method and device, electronic equipment and storage medium |
CN114995842A (en) * | 2022-08-01 | 2022-09-02 | 中科方德软件有限公司 | Method and device for installing operating system and readable storage medium |
WO2023061172A1 (en) * | 2021-10-14 | 2023-04-20 | 华为技术有限公司 | Application upgrading method and apparatus, and computing device and chip system |
Citations (5)
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 |
US20050125460A1 (en) * | 2003-12-04 | 2005-06-09 | Lindeng Yu | [method for resotoring backup data] |
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 |
-
2019
- 2019-06-28 CN CN201910579233.4A patent/CN112230947B/en active Active
Patent Citations (5)
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 |
US20050125460A1 (en) * | 2003-12-04 | 2005-06-09 | Lindeng Yu | [method for resotoring backup data] |
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 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023061172A1 (en) * | 2021-10-14 | 2023-04-20 | 华为技术有限公司 | Application upgrading method and apparatus, and computing device and chip system |
CN114398065A (en) * | 2022-03-24 | 2022-04-26 | Tcl通讯科技(成都)有限公司 | Micro front-end system updating method and device, electronic equipment and storage medium |
CN114398065B (en) * | 2022-03-24 | 2022-07-08 | Tcl通讯科技(成都)有限公司 | Micro front-end system updating method and device, electronic equipment and storage medium |
CN114995842A (en) * | 2022-08-01 | 2022-09-02 | 中科方德软件有限公司 | Method and device for installing operating system and readable storage medium |
CN114995842B (en) * | 2022-08-01 | 2022-11-01 | 中科方德软件有限公司 | Method and device for installing operating system and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112230947B (en) | 2025-04-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9697228B2 (en) | Secure relational file system with version control, deduplication, and error correction | |
RU2409838C2 (en) | Archiving data in virtual application enviroinment | |
US9411691B2 (en) | Virtual machine disaster recovery | |
US10204016B1 (en) | Incrementally backing up file system hard links based on change logs | |
CN111008034B (en) | Patch generation method and device | |
US10275315B2 (en) | Efficient backup of virtual data | |
CN112230947B (en) | Operating system upgrade method and upgrade system | |
CN103176864A (en) | A backup method, device and mobile terminal based on Android system | |
US12197289B2 (en) | Managing files according to categories | |
US20230177157A1 (en) | Malware protection for virtual machines | |
US12105594B2 (en) | Creating file recipes for copy overwrite workloads in deduplication file systems | |
US11616805B2 (en) | Malware protection for virtual machines | |
US8843450B1 (en) | Write capable exchange granular level recoveries | |
US20210232682A1 (en) | Malware protection for virtual machines | |
US8671075B1 (en) | Change tracking indices in virtual machines | |
CN108038028B (en) | File backup method and device and file restoration method and device | |
US8595271B1 (en) | Systems and methods for performing file system checks | |
US8819657B1 (en) | Method and apparatus for maintaining data consistency in a virtualized application during software update installation | |
US11392546B1 (en) | Method to use previously-occupied inodes and associated data structures to improve file creation performance | |
CN113867768A (en) | Operating system processing method and device, electronic equipment and storage medium | |
US20120303590A1 (en) | Management of deduplicated data during restoration in a network archival and retrieval system | |
CN106933604A (en) | A kind of method for upgrading system and device | |
US20200097172A1 (en) | Mounting a drive to multiple computing systems | |
CN111400243A (en) | Research and development management system based on pipeline service and file storage method and device | |
CN109144948B (en) | Application file positioning method and device, electronic equipment and memory |
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 |