CN112579361A - Backup data reconstruction method, device, equipment and storage medium - Google Patents

Backup data reconstruction method, device, equipment and storage medium Download PDF

Info

Publication number
CN112579361A
CN112579361A CN202011573435.7A CN202011573435A CN112579361A CN 112579361 A CN112579361 A CN 112579361A CN 202011573435 A CN202011573435 A CN 202011573435A CN 112579361 A CN112579361 A CN 112579361A
Authority
CN
China
Prior art keywords
data
information
system volume
target
volume 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.)
Granted
Application number
CN202011573435.7A
Other languages
Chinese (zh)
Other versions
CN112579361B (en
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.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware 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 Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Priority to CN202011573435.7A priority Critical patent/CN112579361B/en
Publication of CN112579361A publication Critical patent/CN112579361A/en
Application granted granted Critical
Publication of CN112579361B publication Critical patent/CN112579361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for reconstructing backup data, wherein the method comprises the following steps: analyzing the backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored; acquiring storage information of non-system volume data; and sending the storage information of the non-system volume data and the system volume data to a target computer so that the target computer runs an operating system based on the system volume data, and mounting the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data. In the prior art, full data recovery or rapid data recovery is required, but the storage information of the non-system volume data and the system volume data are sent to the target computer by the method, so that the target computer runs an operating system based on the system volume data, and the non-system volume is mounted in the operating system through the storage information, so that rapid reconstruction of backup data is realized, and further the reconstruction period of a service system is shortened.

Description

Backup data reconstruction method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data recovery technologies, and in particular, to a backup data reconstruction method, apparatus, device, and storage medium.
Background
With the rapid development of the internet, backup data reconstruction is a key concern for all enterprises and users. In the scenario of restoring backup data of a computer complete machine, the prior art adopts full data restoration and fast data restoration, wherein the full data restoration has low requirements on a network environment, but the restoration service takes long time, especially when the service data volume is large. The fast data recovery consumes short time, and can recover data while recovering service, but needs to complete network configuration at the early stage of system startup, otherwise, the data recovery and service recovery cannot be performed later.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for reconstructing backup data, and aims to solve the technical problem of how to realize rapid reconstruction of the backup data under the condition of shortening the reconstruction period of a service system.
In order to achieve the above object, the present invention provides a backup data reconstruction method, including:
analyzing the backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored;
acquiring storage information of the non-system volume data;
and sending the storage information of the non-system volume data and the system volume data to a target computer so that the target computer runs an operating system based on the system volume data, and mounting the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data.
Optionally, the step of sending the storage information of the non-system volume data and the system volume data to a target computer, so that the target computer runs an operating system based on the system volume data, and mounts the non-system volume data in the operating system through the storage information, so as to achieve fast reconstruction of backup data includes:
performing system recombination according to the system volume data to obtain a disk partition, a disk volume and a disk file;
determining a target system volume according to the disk partition, the disk volume and the disk file, and acquiring target system configuration information of a target computer according to the target system volume;
sending the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume in the operating system through the storage information to realize rapid reconstruction of backup data;
after the step of sending the storage information of the non-system volume data and the system volume data to a target computer to enable the target computer to run an operating system based on the system volume data and mount the non-system volume in the operating system through the storage information to achieve fast reconstruction of backup data, the method further includes:
and generating a service starting instruction according to the non-system service information, and sending the service starting instruction to the target computer so as to enable the target computer to start the non-system service according to the service starting instruction.
Optionally, the step of performing system reorganization according to the system volume data to obtain a disk partition, a disk volume, and a disk file includes:
obtaining disk partition metadata information, disk volume metadata information and disk file metadata information according to the system volume data;
reconstructing the disk partitions according to the metadata information of the disk partitions;
reorganizing the disk volume according to the disk volume metadata information;
and recombining the disk file according to the metadata information of the disk file.
Optionally, the step of determining a target system volume according to the disk partition, the disk volume, and the disk file includes:
acquiring disk partition information corresponding to the disk partitions, disk volume information corresponding to the disk volumes and disk file information corresponding to the disk files;
and determining a target system volume according to the disk partition information, the disk volume information and the disk file information.
Optionally, the step of obtaining target system configuration information of the target computer according to the target system volume includes:
acquiring system starting configuration information and registration service information of a target computer;
analyzing the registered service information to obtain non-system service information;
and modifying the system starting configuration information according to the target system volume and the non-system service information, forbidding non-system service, and obtaining target system configuration information.
Optionally, the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume data in the operating system through the storage information, so as to achieve fast reconstruction of backup data includes:
and sending the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, acquires network configuration information from the system volume data, performs network configuration on the target computer based on the network configuration information, and mounts the non-system volume in the operating system through the storage information when the network configuration is successful, so as to realize rapid reconstruction of backup data.
Optionally, before the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, acquires network configuration information from the system volume data, and performs network configuration on the target computer based on the network configuration information, and when the network configuration is successful, mount the non-system volume in the operating system through the storage information, so as to implement fast reconstruction of backup data, the method further includes:
acquiring superblock data of a non-system volume in the backup data to be restored, and determining target storage position information corresponding to the superblock data;
the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, acquires network configuration information from the system volume data, and performs network configuration on the target computer based on the network configuration information, and when the network configuration is successful, mounts the non-system volume in the operating system through the storage information, so as to realize rapid reconstruction of backup data, includes:
and sending the target storage position information, the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, network configuration information is obtained from the system volume data, the target computer carries out network configuration based on the network configuration information, when the network configuration is successful, the superblock data is read based on the target storage position information, and the non-system volume is mounted in the operating system through the storage information, so that the rapid reconstruction of backup data is realized.
In addition, to achieve the above object, the present invention further provides a backup data reconstruction apparatus, including:
the determining module is used for analyzing the backup data to be restored so as to determine system volume data and non-system volume data in the backup data to be restored;
the acquisition module is used for acquiring the storage information of the non-system volume data;
and the rebuilding module is used for sending the storage information of the non-system volume data and the system volume data to a target computer so as to enable the target computer to run an operating system based on the system volume data, and mount the non-system volume data in the operating system through the storage information to realize the rapid rebuilding of the backup data.
In addition, to achieve the above object, the present invention further provides a backup data reconstruction device, including: a memory, a processor and a backup data reconstruction program stored on the memory and executable on the processor, the backup data reconstruction program configured to implement the steps of the backup data reconstruction method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium having a backup data reconstruction program stored thereon, wherein the backup data reconstruction program, when executed by a processor, implements the steps of the backup data reconstruction method as described above.
The method comprises the steps of firstly analyzing backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored, then acquiring storage information of the non-system volume data, and then sending the storage information of the non-system volume data and the system volume data to a target computer, so that the target computer runs an operating system based on the system volume data, and mounts the non-system volume data in the operating system through the storage information to realize rapid reconstruction of the backup data. In the prior art, full data recovery or rapid data recovery is required, but the storage information of the non-system volume data and the system volume data are sent to the target computer by the method, so that the target computer runs an operating system based on the system volume data, and the non-system volume is mounted in the operating system through the storage information, so that rapid reconstruction of backup data is realized, and further the reconstruction period of a service system is shortened.
Drawings
Fig. 1 is a schematic structural diagram of a backup data reconstruction device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a backup data reconstruction method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a backup data reconstruction method according to a second embodiment of the present invention;
fig. 4 is a block diagram of a backup data reconstruction device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a backup data reconstruction device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the backup data reconstruction apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the backup data reconstruction device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and a backup data reconstruction program.
In the backup data reconstruction device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the backup data reconstruction device according to the present invention may be disposed in the backup data reconstruction device, and the backup data reconstruction device calls the backup data reconstruction program stored in the memory 1005 through the processor 1001 and executes the backup data reconstruction method according to the present invention.
An embodiment of the present invention provides a backup data reconstruction method, and referring to fig. 2, fig. 2 is a schematic flowchart of a backup data reconstruction method according to a first embodiment of the present invention.
In this embodiment, the backup data reconstruction method includes the following steps:
step S10: and analyzing the backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored.
It is easy to understand that the execution main body of the embodiment may be a backup data reconstruction device having functions of data processing, network communication, program operation, and the like, or may also be other computer devices having similar functions, and the backup data reconstruction device in the embodiment may be a backup program, and the backup program is taken as the execution main body for illustration, which is not limited in the embodiment.
The backup program can backup the operating system, application programs, service data, and metadata of the partition, volume, file system, etc. of the computer to other computers.
In this embodiment, a source computer and a target computer also exist, where the source computer and the target computer may be the same or different, and if the source computer is different from the target computer, the data to be restored and backed up is data backed up by all valid data on a disk of the source computer, including an operating system, an application program, and service data of the source computer, and partition, volume, and file system metadata of the disk.
It should be noted that the system volume refers to a volume for storing a boot program, an operating system program, and an application program, such as a C disk and a reserved partition in Windows, a boot partition and a root partition in Linux, and these volumes/partitions are automatically created when the operating system is installed. The data on the system volumes is typically relatively small.
The non-system volume (also referred to as a data volume) refers to a volume on a computer except for a system volume, and a user/administrator creates a volume/partition by himself after the system is installed, and the volume/partition is used for storing service data or materials, such as a D disk and an E disk of windows. Data on non-system volumes is typically large.
In a specific implementation, when a source computer encounters a fault and a service system cannot be started, data backed up in advance needs to be restored to a target computer to rebuild the service system, wherein the backed-up data needs to be analyzed before data restoration is performed to obtain system volume data, non-system volume data and the like.
Step S20: and acquiring the storage information of the non-system volume data.
The storage information of the non-system volume data can be understood as the storage location of the non-system volume data on the disk in the backup data.
Step S30: and sending the storage information of the non-system volume data and the system volume data to a target computer so that the target computer runs an operating system based on the system volume data, and mounting the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data.
Further, in order to perform fast reconstruction on the backup data, the step of sending the storage information of the non-system volume data and the system volume data to the target computer so that the target computer runs the operating system based on the system volume data, and mounting the non-system volume in the operating system through the storage information to achieve fast reconstruction of the backup data may be that system reorganization is performed according to the system volume data to obtain the disk partition, the disk volume and the disk file, then the target system volume is determined according to the disk partition, the disk volume and the disk file, and the target system configuration information of the target computer is obtained according to the target system volume, and then the target system configuration information, the storage information of the non-system volume data and the system volume data are sent to the target computer so that the target computer runs the operating system based on the system volume data and the target system configuration information, and mounting the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data, generating a service starting instruction according to the non-system service information after the system enters a rapid reconstruction state, and sending the service starting instruction to the target computer so as to enable the target computer to start the non-system service according to the service starting instruction. That is, previously disabled non-system services are re-enabled and all power-on auto-initiated services are re-enabled. Since there is a dependency relationship in the starting of the service, before the service is started, the dependency relationship of the service needs to be analyzed, and the dependent service needs to be started preferentially.
After all the service programs are started, the service programs on the system can normally provide services to the outside, and the remaining unreduced data can be recovered in the subsequent service providing process or when the system is idle.
In a specific implementation, when a source computer encounters a fault and a business system cannot be started, data backed up in advance needs to be restored to a target computer to rebuild the business system, wherein before the backup data is restored, the backup data needs to be analyzed to identify a system volume, and then all data of the system volume needs to be restored to the target computer.
The process of identifying the system Volume is that some volumes in the backup data may be virtual volumes, such as Logical Volume Manager (lvm) of Linux, soft raid, and dynamic disks of Microsoft Windows operating system (Microsoft Windows, Windows), which are all identified and assembled one by one, then partitions, volumes, and file systems that are the same as those of the original computer are reassembled according to metadata information of partitions, volumes, and file systems of the disks in the backup data, and then the system Volume is identified after the partitions, volumes, and file systems of the disks are assembled.
It should be noted that the system of the target computer may be a Windows system, a Linux system, and the like, where the system volume of Windows includes msr partition, esp partition, system partition, and reserved partition; the system volume of Linux comprises an esp partition, a boot partition, a root partition, and/etc., directory-dependent partitions such as/etc.,/home,/var, etc.
It should be further noted that the processing method for performing system restructuring according to the system volume data to obtain the disk partition, the disk volume, and the disk file may be that obtaining the metadata information of the disk partition, the metadata information of the disk volume, and the metadata information of the disk file according to the system volume data, then restructuring the disk partition according to the metadata information of the disk partition, restructuring the disk volume according to the metadata information of the disk volume, determining the target system volume according to the metadata information of the disk partition, the metadata information of the disk volume, and the information of the disk file, finally obtaining the system startup configuration information and the registration service information of the target computer, identifying the registration service information, obtaining the system service information and the non-system service information, disabling the non-system service information, and finally modifying the system startup configuration information according to the target system volume and the non-system service information, obtain target system configuration information, and the like.
In the specific implementation, after all system volumes need to be identified, network configuration information of a target computer and disk area information of non-system volumes are acquired, the network configuration information and the disk area information are written into a configuration file in the target system volume, then the network configuration information, the target system configuration information, storage information of non-system volume data and system volume data are sent to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, the target computer performs network configuration based on the network configuration information, when the network configuration is successful, a kernel restoring program enters a reconstruction state, and then the non-system volumes are mounted in the operating system through the storage information, so that rapid reconstruction of backup data is achieved.
In this embodiment, the configuration of the system needs to be modified, otherwise, after the system volume is completely restored, the system may not work normally on the target computer. The step of modifying the configuration of the system includes disabling non-system services. Regardless of the Windows or Linux system, many services are registered, both for the system itself and for applications, and these services run automatically after the system is started (and some are started manually, depending on the type of service registered). Because the system volume is only fully restored in the first stage, the data of the non-system volume is not restored, if some service programs access the volumes, the access fails, so that the service exception is caused, and the problem cannot occur after the service programs are forbidden.
The method of identifying non-system services may be that all registered services are system services when the system is just installed, and otherwise are non-system services. When the configuration is modified, the non-system services are disabled, so that the non-system service programs cannot be started when the restored system is started.
The step of modifying the configuration of the system further includes hiding the non-system volume and disabling the automatic mounting of the non-system volume. Since the first stage is only to restore the system volumes in full, the data of the non-system volumes is not restored, and if the system is mounted after starting, the system may fail to start. The non-system volumes are hidden and disabled, and when the restored system is started, the existence of the volumes cannot be sensed (just like the system is installed), so that the system can be started normally.
Network configuration information of a target computer and disk area information of a non-system volume are also required to be obtained, and then the network configuration information and the disk area information are written into a configuration file in the target system volume and are required to be used in subsequent quick reconstruction.
After the configuration is corrected, the data for all system volumes is pushed to the target computer, and since the data volume for these volumes is not too large (substantially equivalent to the data volume when the system was just installed), it does not take too much time.
After the data of the system volume is pushed, the disk area corresponding to the super block of the non-system volume is cleared on the target computer to realize the hiding of the non-system volume. The target computer is then restarted, and after startup the system is booted from the restored system volume.
Because the system volume is completely restored, the system can be subjected to complex network configuration after being started, such as VPN connection or network card aggregation, and after the network configuration is successful, the kernel restoring program can be connected to the backup server to quickly rebuild the volume which is not restored.
The volume that has not been restored can be processed by capturing all disk read-write operations of the operating system and the application program, determining whether the data in the operating disk area has been restored, if not, restoring the data in the area first, and then releasing the read-write operations of the disk. Therefore, the operating system and the application program can normally access the data of the disk regardless of whether the data of the disk is restored or not.
After the kernel restore program enters a fast rebuilding state, superblock data is extracted from the non-system volume data, target storage position information corresponding to the superblock data is determined, namely superblock data of all non-system volumes are read back from the backup server and written into corresponding volumes, and after the superblock data are successfully written, an operating system is informed to rescan all volume devices to activate the non-system volumes. Meanwhile, the automatic mounting function of the volume is also started, and all non-system volumes are mounted on the corresponding paths, so that the application program can normally access the data on the volumes.
Further, in order to ensure that the non-system services can operate normally, the previously disabled non-system services need to be re-enabled, and all the services started automatically after the boot process need to be re-enabled. Since there is a dependency relationship in the starting of the service, before the service is started, the dependency relationship of the service needs to be analyzed, and the dependent service needs to be started preferentially.
After all the service programs are started, the service programs on the system can normally provide services to the outside, and the remaining unreduced data can be recovered in the subsequent service providing process or when the system is idle.
In this embodiment, the data on the system volume is fully restored by identifying the system volume in the backup data, and after the system is started, the network configuration is successful, and then the data of the non-system volume is restored. During the data restoring process, the business program on the system can be started normally and provide service to the outside. Because the system volume is completely restored, a backup server does not need to be connected in the starting process of the system to restore the data. After the system is successfully started and the Network configuration is finished (Virtual Private Network (VPN) connection or Network card aggregation is performed, etc.), the remaining data is quickly reconstructed. In general, the system volume data of the business system is not too large, which is substantially equal to the data volume when the operating system is just installed (Linux system is generally less than 5GB, and Windows system is generally less than 30GB), so that it does not take too much time to restore the data, while the non-system data is large (often more than 1000GB), which is time-consuming to restore. In this scenario, the method of restoring the system volume in full first and then rapidly reconstructing the service data volume may also achieve rapid reconstruction of the system service.
In this embodiment, first, to-be-restored backup data is analyzed to determine system volume data and non-system volume data in the to-be-restored backup data, then storage information of the non-system volume data is acquired, and then the storage information of the non-system volume data and the system volume data are sent to a target computer, so that the target computer runs an operating system based on the system volume data, and the non-system volume data is mounted in the operating system through the storage information, so as to realize rapid reconstruction of the backup data. In the prior art, full data recovery or rapid data recovery is required, the requirement of the full data recovery on a network environment is low, but the time for recovering services is long, especially when the service data volume is large; the embodiment sends the storage information of the non-system volume data and the system volume data to the target computer so that the target computer runs an operating system based on the system volume data, and mounts the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data, thereby shortening the reconstruction period of the service system.
Referring to fig. 3, fig. 3 is a flowchart illustrating a backup data rebuilding method according to a second embodiment of the present invention.
Based on the first embodiment, in this embodiment, the step S30 further includes:
step S301: and performing system recombination according to the system volume data to obtain a disk partition, a disk volume and a disk file.
In a specific implementation, when a source computer encounters a fault and a business system cannot be started, data backed up in advance needs to be restored to a target computer to rebuild the business system, wherein before the backup data is restored, the backup data needs to be analyzed to identify a system volume, and then all data of the system volume needs to be restored to the target computer.
The process of identifying the system volume is that some volumes in the backup data may be virtual volumes, such as lvm of Linux, soft raid, and dynamic disk of Windows, which are identified and assembled one by one, and then, according to the metadata information of the partition, volume, and file system of the disk in the backup data, the partition, volume, and file system that are the same as those of the original computer are reassembled.
Step S302: and determining a target system volume according to the disk partition, the disk volume and the disk file, and acquiring target system configuration information of a target computer according to the target system volume.
It should be noted that the system of the target computer may be a Windows system, a Linux system, and the like, where the system volume of Windows includes msr partition, esp partition, system partition, and reserved partition; the system volume of Linux comprises an esp partition, a boot partition, a root partition, and/etc., directory-dependent partitions such as/etc.,/home,/var, etc.
In this embodiment, the configuration of the system, that is, the system startup configuration information of the target computer, needs to be modified, otherwise, after the system volume is completely restored, the system may not work normally on the target computer. The step of modifying the configuration of the system includes disabling non-system services. Regardless of the Windows or Linux system, many services are registered, both for the system itself and for applications, and these services run automatically after the system is started (and some are started manually, depending on the type of service registered). Because the system volume is only fully restored in the first stage, the data of the non-system volume is not restored, if some service programs access the volumes, the access fails, so that the service exception is caused, and the problem cannot occur after the service programs are forbidden.
When the configuration is modified, the non-system services are disabled, so that the non-system service programs cannot be started when the restored system is started.
The step of modifying the configuration of the system further includes hiding the non-system volume and disabling the automatic mounting of the non-system volume. Since the first stage is only to restore the system volumes in full, the data of the non-system volumes is not restored, and if the system is mounted after starting, the system may fail to start. The non-system volumes are hidden and disabled, and when the restored system is started, the existence of the volumes cannot be sensed (just like the system is installed), so that the system can be started normally.
Network configuration information of a target computer and disk area information of a non-system volume are also required to be obtained, and then the network configuration information and the disk area information are written into a configuration file in the target system volume and are required to be used in subsequent quick reconstruction.
Step S303: and sending the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume data in the operating system through the storage information, thereby realizing the rapid reconstruction of the backup data.
After the configuration is corrected, the target system configuration information, the storage information of the non-system volume data and the system volume data are sent to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, since the data volume of the volumes is not too large (basically equal to the data volume when the system is just installed), too much time is not consumed, and then the non-system volume data are mounted in the operating system through the storage information, so that the backup data are quickly rebuilt.
In a specific implementation, after the data of the system volume is pushed, a disk area corresponding to a super block of the non-system volume is cleared on the target computer, so as to hide the non-system volume. The target computer is then restarted, and after startup the system is booted from the restored system volume.
Because the system volume is completely restored, the system can be subjected to complex network configuration after being started, such as VPN connection or network card aggregation, and after the network configuration is successful, the kernel restoring program can be connected to the backup server to quickly rebuild the volume which is not restored.
The volume that has not been restored can be processed by capturing all disk read-write operations of the operating system and the application program, determining whether the data in the operating disk area has been restored, if not, restoring the data in the area first, and then releasing the read-write operations of the disk. Therefore, the operating system and the application program can normally access the data of the disk regardless of whether the data of the disk is restored or not.
After the kernel restore program enters a fast rebuilding state, superblock data is extracted from the non-system volume data, target storage position information corresponding to the superblock data is determined, namely superblock data of all non-system volumes are read back from the backup server and written into corresponding volumes, and after the superblock data are successfully written, an operating system is informed to rescan all volume devices to activate the non-system volumes. Meanwhile, the automatic mounting function of the volume is also started, and all non-system volumes are mounted on the corresponding paths, so that the application program can normally access the data on the volumes.
Further, in order to ensure that the non-system services can operate normally, the previously disabled non-system services need to be re-enabled, and all the services started automatically after the boot process need to be re-enabled. Since there is a dependency relationship in the starting of the service, before the service is started, the dependency relationship of the service needs to be analyzed, and the dependent service needs to be started preferentially.
After all the service programs are started, the service programs on the system can normally provide services to the outside, and the remaining unreduced data can be recovered in the subsequent service providing process or when the system is idle.
In this embodiment, first, system reorganization is performed according to system volume data to obtain a disk partition, a disk volume, and disk files, then a target system volume is determined according to the disk partition, the disk volume, and the disk files, target system configuration information of a target computer is obtained according to the target system volume, and then the target system configuration information, storage information of non-system volume data, and the system volume data are sent to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and the non-system volume is mounted in the operating system through the storage information to achieve rapid reconstruction of backup data, thereby shortening a data recovery period.
Referring to fig. 4, fig. 4 is a block diagram illustrating a first embodiment of a backup data reconstruction device according to the present invention.
As shown in fig. 4, the backup data reconstruction apparatus according to the embodiment of the present invention includes:
the determining module 4001 is configured to analyze backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored;
an obtaining module 4002, configured to obtain storage information of the non-system volume data;
the rebuilding module 4003 is configured to send the storage information of the non-system volume data and the system volume data to a target computer, so that the target computer runs an operating system based on the system volume data, and mounts the non-system volume data in the operating system through the storage information, so as to implement fast rebuilding of the backup data.
In this embodiment, first, to-be-restored backup data is analyzed to determine system volume data and non-system volume data in the to-be-restored backup data, then storage information of the non-system volume data is acquired, and then the storage information of the non-system volume data and the system volume data are sent to a target computer, so that the target computer runs an operating system based on the system volume data, and the non-system volume data is mounted in the operating system through the storage information, so as to realize rapid reconstruction of the backup data. In the prior art, full data recovery or rapid data recovery is required, the requirement of the full data recovery on a network environment is low, but the time for recovering services is long, especially when the service data volume is large; the embodiment sends the storage information of the non-system volume data and the system volume data to the target computer so that the target computer runs an operating system based on the system volume data, and mounts the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data, thereby shortening the reconstruction period of the service system.
Further, the reconstruction module 4003 is further configured to perform system restructuring according to the system volume data to obtain a disk partition, a disk volume, and a disk file;
the reconstruction module 4003 is further configured to determine a target system volume according to the disk partition, the disk volume, and the disk file, and acquire target system configuration information of a target computer according to the target system volume;
the rebuilding module 4003 is further configured to send the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume in the operating system through the storage information, so as to implement fast rebuilding of backup data;
the rebuilding module 4003 is further configured to generate a service starting instruction according to the non-system service information, and send the service starting instruction to the target computer, so that the target computer starts the non-system service according to the service starting instruction.
Further, the reconstruction module 4003 is further configured to obtain metadata information of a disk partition, metadata information of a disk volume, and metadata information of a disk file according to the system volume data;
the reconstruction module 4003 is further configured to reconstruct the disk partition according to the metadata information of the disk partition;
the rebuilding module 4003 is further configured to rebuild the disk volume according to the disk volume metadata information;
the reconstruction module 4003 is further configured to reconstruct a disk file according to the disk file metadata information.
Further, the reconstruction module 4003 is further configured to obtain disk partition information corresponding to the disk partition, disk volume information corresponding to the disk volume, and disk file information corresponding to the disk file.
The rebuilding module 4003 is further configured to determine a target system volume according to the disk partition information, the disk volume information, and the disk file information.
Further, the rebuilding module 4003 is further configured to obtain system startup configuration information of the target computer;
the rebuilding module 4003 is further configured to modify the system startup configuration information according to the target system volume, so as to obtain target system configuration information.
Further, the rebuilding module 4003 is further configured to send the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, obtains network configuration information from the system volume data, and performs network configuration on the target computer based on the network configuration information, and when the network configuration is successful, the non-system volume is mounted in the operating system through the storage information, so as to implement fast rebuilding of the backup data. .
Further, the rebuilding module 4003 is further configured to acquire superblock data of a non-system volume in the backup data to be restored, and determine target storage location information corresponding to the superblock data;
the rebuilding module 4003 is further configured to send the target storage location information, the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, obtains network configuration information from the system volume data, and performs network configuration based on the network configuration information, when the network configuration is successful, the superblock data is read based on the target storage location information, and the non-system volume is mounted in the operating system through the storage information, so as to implement fast rebuilding of backup data.
Other embodiments or specific implementation manners of the backup data reconstruction device of the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A backup data reconstruction method, wherein the backup data reconstruction method comprises the steps of:
analyzing the backup data to be restored to determine system volume data and non-system volume data in the backup data to be restored;
acquiring storage information of the non-system volume data;
and sending the storage information of the non-system volume data and the system volume data to a target computer so that the target computer runs an operating system based on the system volume data, and mounting the non-system volume in the operating system through the storage information to realize the rapid reconstruction of the backup data.
2. The method of claim 1, wherein the step of sending the storage information of the non-system volume data and the system volume data to a target computer to make the target computer run an operating system based on the system volume data and mount the non-system volume data in the operating system through the storage information to realize fast reconstruction of backup data comprises:
performing system recombination according to the system volume data to obtain a disk partition, a disk volume and a disk file;
determining a target system volume according to the disk partition, the disk volume and the disk file, and acquiring target system configuration information of a target computer according to the target system volume;
sending the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume in the operating system through the storage information to realize rapid reconstruction of backup data;
after the step of sending the storage information of the non-system volume data and the system volume data to a target computer to enable the target computer to run an operating system based on the system volume data and mount the non-system volume in the operating system through the storage information to achieve fast reconstruction of backup data, the method further includes:
and generating a service starting instruction according to the non-system service information, and sending the service starting instruction to the target computer so as to enable the target computer to start the non-system service according to the service starting instruction.
3. The method of claim 2, wherein the step of performing system reorganization according to the system volume data to obtain the disk partition, the disk volume, and the disk file comprises:
obtaining disk partition metadata information, disk volume metadata information and disk file metadata information according to the system volume data;
reconstructing the disk partitions according to the metadata information of the disk partitions;
reorganizing the disk volume according to the disk volume metadata information;
and recombining the disk file according to the metadata information of the disk file.
4. The method of claim 3, wherein the step of determining a target system volume from the disk partition, the disk volume, and the disk file comprises:
acquiring disk partition information corresponding to the disk partitions, disk volume information corresponding to the disk volumes and disk file information corresponding to the disk files;
and determining a target system volume according to the disk partition information, the disk volume information and the disk file information.
5. The method of claim 4, wherein the step of obtaining target system configuration information for a target computer from the target system volume comprises:
acquiring system starting configuration information and registration service information of a target computer;
analyzing the registered service information to obtain non-system service information;
and modifying the system starting configuration information according to the target system volume and the non-system service information to obtain target system configuration information.
6. The method according to any one of claims 1 to 5, wherein the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, and mounts the non-system volume data in the operating system through the storage information, so as to realize fast reconstruction of backup data comprises:
and sending the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, acquires network configuration information from the system volume data, performs network configuration on the target computer based on the network configuration information, and mounts the non-system volume in the operating system through the storage information when the network configuration is successful, so as to realize rapid reconstruction of backup data.
7. The method of claim 6, wherein before the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, obtains network configuration information from the system volume data, and causes the target computer to perform network configuration based on the network configuration information, and when the network configuration is successful, the step of mounting the non-system volume in the operating system through the storage information to achieve fast reconstruction of backup data further comprises:
acquiring superblock data of a non-system volume in the backup data to be restored, and determining target storage position information corresponding to the superblock data;
the step of sending the target system configuration information, the storage information of the non-system volume data, and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, acquires network configuration information from the system volume data, and performs network configuration on the target computer based on the network configuration information, and when the network configuration is successful, mounts the non-system volume in the operating system through the storage information, so as to realize rapid reconstruction of backup data, includes:
and sending the target storage position information, the target system configuration information, the storage information of the non-system volume data and the system volume data to the target computer, so that the target computer runs an operating system based on the system volume data and the target system configuration information, network configuration information is obtained from the system volume data, the target computer carries out network configuration based on the network configuration information, when the network configuration is successful, the superblock data is read based on the target storage position information, and the non-system volume is mounted in the operating system through the storage information, so that the rapid reconstruction of backup data is realized.
8. A backup data reconstruction apparatus, comprising:
the determining module is used for analyzing the backup data to be restored so as to determine system volume data and non-system volume data in the backup data to be restored;
the acquisition module is used for acquiring the storage information of the non-system volume data;
and the rebuilding module is used for sending the storage information of the non-system volume data and the system volume data to a target computer so as to enable the target computer to run an operating system based on the system volume data, and mount the non-system volume data in the operating system through the storage information to realize the rapid rebuilding of the backup data.
9. A backup data reconstruction device, comprising: memory, a processor and a backup data reconstruction program stored on the memory and executable on the processor, the backup data reconstruction program when executed by the processor implementing the steps of the backup data reconstruction method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a backup data reconstruction program which, when executed by a processor, implements the steps of the backup data reconstruction method according to any one of claims 1 to 7.
CN202011573435.7A 2020-12-25 2020-12-25 Backup data reconstruction method, device, equipment and storage medium Active CN112579361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011573435.7A CN112579361B (en) 2020-12-25 2020-12-25 Backup data reconstruction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011573435.7A CN112579361B (en) 2020-12-25 2020-12-25 Backup data reconstruction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112579361A true CN112579361A (en) 2021-03-30
CN112579361B CN112579361B (en) 2024-04-02

Family

ID=75140124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011573435.7A Active CN112579361B (en) 2020-12-25 2020-12-25 Backup data reconstruction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112579361B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020541A (en) * 2022-01-05 2022-02-08 深圳市科力锐科技有限公司 Backup data display method, device, equipment and storage medium
CN114816571A (en) * 2022-04-15 2022-07-29 西安广和通无线通信有限公司 Method, device and equipment for hanging flash memory and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968422A (en) * 2011-08-31 2013-03-13 中国航天科工集团第二研究院七○六所 System and method for controlling streaming data storage
CN104407931A (en) * 2014-10-28 2015-03-11 国云科技股份有限公司 Method for obtaining mirror image of damaged system disk of virtual machine
CN106201654A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of rescue method of dummy machine system
US20170017553A1 (en) * 2015-07-16 2017-01-19 Gil Peleg System and Method For Mainframe Computers Backup and Restore
CN107122267A (en) * 2017-05-31 2017-09-01 广州鼎甲计算机科技有限公司 A kind of Windows operating system carry restoration methods
CN108241550A (en) * 2016-12-23 2018-07-03 研祥智能科技股份有限公司 A kind of operating system backup and reduction method
CN110941515A (en) * 2019-12-04 2020-03-31 深圳市科力锐科技有限公司 Host backup reconstruction method, device, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968422A (en) * 2011-08-31 2013-03-13 中国航天科工集团第二研究院七○六所 System and method for controlling streaming data storage
CN104407931A (en) * 2014-10-28 2015-03-11 国云科技股份有限公司 Method for obtaining mirror image of damaged system disk of virtual machine
US20170017553A1 (en) * 2015-07-16 2017-01-19 Gil Peleg System and Method For Mainframe Computers Backup and Restore
CN106201654A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of rescue method of dummy machine system
CN108241550A (en) * 2016-12-23 2018-07-03 研祥智能科技股份有限公司 A kind of operating system backup and reduction method
CN107122267A (en) * 2017-05-31 2017-09-01 广州鼎甲计算机科技有限公司 A kind of Windows operating system carry restoration methods
CN110941515A (en) * 2019-12-04 2020-03-31 深圳市科力锐科技有限公司 Host backup reconstruction method, device, server and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AHMAD H. AL-SHARIDAH等: "Toward cost effective and optimal selection of IT disaster recovery cloud solution", 《2017 9TH COMPUTER SCIENCE AND ELECTRONIC ENGINEERING (CEEC)》, 9 November 2017 (2017-11-09), pages 43 - 48 *
张永夏: "管理Docker容器的数据卷", 《网络安全和信息化》, 5 October 2017 (2017-10-05), pages 83 - 85 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114020541A (en) * 2022-01-05 2022-02-08 深圳市科力锐科技有限公司 Backup data display method, device, equipment and storage medium
CN114816571A (en) * 2022-04-15 2022-07-29 西安广和通无线通信有限公司 Method, device and equipment for hanging flash memory and storage medium
CN114816571B (en) * 2022-04-15 2023-06-16 西安广和通无线通信有限公司 Method, device, equipment and storage medium for plug-in flash memory

Also Published As

Publication number Publication date
CN112579361B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
US11789823B2 (en) Selective processing of file system objects for image level backups
EP3474138B1 (en) Item-level restoration and verification of image level backups
US7000229B2 (en) Method and system for live operating environment upgrades
CN107870968B (en) Performing real-time updates to a file system volume
US8566640B2 (en) Systems, methods, and computer program products for instant recovery of image level backups
WO2017049828A1 (en) Method, device and system for data processing based on linux
US20080120350A1 (en) System and Method for Management of End User Computing Devices
CN112579361B (en) Backup data reconstruction method, device, equipment and storage medium
CN112596950B (en) Virtual machine data backup method, device, equipment and storage medium
CN110209525B (en) Operating system restoration method and device
EP3159797B1 (en) Efficient processing of file system objects for image level backups
CN113485755B (en) Device driver verification method, device and storage medium
CN112596954A (en) Data backup and reconstruction method, device, equipment and storage medium
KR101552580B1 (en) Method for system recovery including mobile device and backup supporting multi operation system
CN104750579B (en) The method and apparatus for making memory mirror
CN110197067B (en) File searching and killing method, device and storage medium
CN117492920A (en) Control method, device, equipment and medium of cloud platform
CN109564533B (en) Device and method for supporting execution of guide process in instant recovery process
CN115543539A (en) Virtual machine password resetting method, device and 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
GR01 Patent grant
GR01 Patent grant