WO2017049828A1 - Method, device and system for data processing based on linux - Google Patents

Method, device and system for data processing based on linux Download PDF

Info

Publication number
WO2017049828A1
WO2017049828A1 PCT/CN2016/073068 CN2016073068W WO2017049828A1 WO 2017049828 A1 WO2017049828 A1 WO 2017049828A1 CN 2016073068 W CN2016073068 W CN 2016073068W WO 2017049828 A1 WO2017049828 A1 WO 2017049828A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
restored
backup
data
directory
Prior art date
Application number
PCT/CN2016/073068
Other languages
French (fr)
Chinese (zh)
Inventor
欧阳茂春
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017049828A1 publication Critical patent/WO2017049828A1/en

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

Definitions

  • the present application relates to the field of information security technologies, for example, to a Linux-based data processing method, apparatus, and system.
  • Linux-based data backup and recovery technology such as tar, cpio, dump and other tools to achieve data backup or recovery.
  • tar tar
  • cpio cpio
  • dump other tools to achieve data backup or recovery.
  • system data backup it is often necessary to restart the system to perform data backup, so that the user has to stop the current application of the system and wait for the system to restart before performing data backup.
  • the embodiment of the invention provides a data processing method, device and system based on Linux, which can solve the problem that data backup can be performed by restarting the system when performing system data backup on a Linux system.
  • An embodiment of the present invention provides a data processing method based on Linux, including:
  • Packaging all the data to be backed up and generating the image file can include:
  • the file to be backed up is packaged into the first directory and an image file of a preset name is generated.
  • the Linux-based data processing method may further include:
  • the obtaining the decompressed system metadata and restoring the system metadata to the current system to be restored may include:
  • the disk partition ratio of the current system to be restored is calculated according to the partition table information in the system metadata and the disk information of the current system to be restored;
  • the disk of the current system to be restored is partitioned
  • the LVM and file system are restored according to the system metadata.
  • the Linux-based data processing method may further include:
  • the embodiment of the invention further provides a data processing device based on Linux, comprising:
  • a receiving module configured to receive a data backup instruction
  • a detection module configured to detect whether a current system environment satisfies a condition for performing data backup while the system continues to operate;
  • the backup module is configured to package all the data to be backed up and generate an image file when the current system environment satisfies the conditions for data backup while the system continues to run.
  • the backup module can include:
  • An obtaining unit configured to obtain a list of skippable files
  • a backup unit configured to store the skippable file list and all system metadata to be backed up to a preset first directory
  • the obtaining unit is further configured to acquire file system mounting information of the current system
  • the backup unit is further configured to mount the corresponding file system to the first directory according to the mounting information
  • the packaging unit is configured to package the file to be backed up into the first directory and generate an image file of a preset name.
  • the Linux-based data processing apparatus may further include:
  • the receiving module is further configured to receive a data recovery instruction
  • An obtaining module configured to acquire an image file according to the data recovery instruction
  • a processing module configured to decompress the image file to obtain system metadata, file system mount information, a skippable file list, and a file to be restored;
  • the obtaining module is further configured to obtain the decompressed system metadata
  • a recovery module configured to restore the system metadata to a current system to be restored
  • the obtaining module is further configured to obtain the decompressed file system mounting information
  • the recovery module is further configured to mount the related file system to a preset second directory according to the file system mounting information
  • the obtaining module is further configured to obtain the decompressed list of the skippable files
  • the recovery module is further configured to restore the extracted files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
  • the recovery module can include:
  • a recovery unit configured to recover the MBR according to the acquired system metadata
  • the calculating unit is configured to calculate a disk partition of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored when the image file is not obtained locally from the current system to be restored. proportion;
  • a partition unit configured to partition a disk of the current system to be restored according to the disk partition ratio
  • the recovery unit is further configured to restore the LVM and the file system according to the system metadata after the disk partition is completed.
  • the Linux-based data processing apparatus may further include:
  • the processing module is further configured to switch the root file directory of the current system to be restored to the second directory;
  • the initrd production module is configured to mount the boot partition and parse the initrd file when the boot partition is not mounted;
  • the obtaining module is further configured to acquire hardware driver information that has been loaded by the current system to be restored;
  • the initrd production module is further configured to package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
  • the processing module is further configured to replace the initrd file of the current system to be restored with the newly generated initrd file;
  • the module is restarted and configured to restart the current system to be restored.
  • the embodiment of the invention also provides a Linux-based data processing system.
  • the Linux based number The processing system includes an image file storage medium, a backup and recovery server.
  • the backup and recovery server includes the above-described Linux-based data processing device; the Linux-based data processing device on the backup and recovery server is configured to back up data on the backup and recovery server as an image file, and The image file is stored locally or on the image file storage medium, and the image file is decompressed and the data is restored to the backup and recovery server when the data needs to be restored.
  • the image file storage medium may include a USB flash drive, an optical disk, and a network server.
  • the Linux-based data processing device supports any of the image file storage media storage in addition to the manner of supporting the local storage image file for backup or recovery. The manner in which the image file is backed up or restored.
  • the method, device and system for processing data based on Linux when analyzing data of the current system environment during data backup, when the current system environment satisfies the condition of data backup while the system continues to operate, Data backup of the data to be backed up without restarting the system breaks through the traditional system data backup method that requires the system to be restarted to back up data.
  • FIG. 1 is a schematic flowchart of a first embodiment of a data processing method based on Linux according to the present invention
  • FIG. 2 is a schematic diagram of a refinement process of packing all the data to be backed up and generating an image file in the second embodiment of the data processing method based on Linux according to the present invention
  • FIG. 3 is a schematic flowchart of data recovery in a third embodiment of a data processing method based on Linux according to the present invention.
  • FIG. 4 is a schematic diagram of a refinement process of restoring system metadata to a system to be restored in a fourth embodiment of a Linux-based data processing method
  • FIG. 5 is a schematic diagram of a refinement process of creating an initrd file in a fifth embodiment of a data processing method based on Linux;
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a data processing apparatus based on Linux;
  • FIG. 7 is a schematic diagram of a refinement function module of a backup module in a second embodiment of a Linux-based data processing device
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a Linux-based data processing apparatus
  • FIG. 9 is a schematic diagram of a refinement function module of a recovery module in a fourth embodiment of a data processing apparatus based on Linux;
  • FIG. 10 is a schematic diagram of functional modules of a fifth embodiment of a Linux-based data processing apparatus
  • FIG. 11 is a schematic structural diagram of a first embodiment of a Linux-based data processing system.
  • the embodiment of the present invention provides a data processing method based on Linux.
  • FIG. 1 a schematic flowchart of a first embodiment of a data processing method based on Linux according to the present invention is shown, including:
  • the server will detect whether the current system environment meets the data backup while the system continues to run. conditions of. Check whether the current system environment meets the conditions for data backup while the system continues to run, that is, whether the current system affects data backup occurs. In this embodiment, it can be determined whether the current system satisfies the condition for performing data backup while the system continues to run by detecting whether the current system has other memory processes that are reading or writing memory data or having a hard disk error. When any of the above situations occur, the server does not start the data backup program and gives a related prompt message; when none of the above occurs, the server starts the data backup program to perform data backup.
  • the server After the data backup program is started, while the data backup operation is being performed, the server detects in real time whether the current system environment satisfies the conditions for data backup while the system continues to run, and detects the current condition.
  • the system environment does not meet the conditions for data backup while the system continues to run, suspending the data backup operation, and continuing the previously suspended operation when it detects that the current system environment satisfies the conditions for data backup while the system continues to run.
  • the data to be backed up may be system data, or may be system data and file system data, and is determined according to a user's selection. Take the backup of system data and file system data as an example.
  • parameter analysis is performed to obtain parameter information such as the backup directory specified by the user and the name of the generated image file. Then, after scanning the disk to find the boot partition, use the dd command.
  • a file system is mounted to the backup directory; after that, the backup directory is packaged and a mirror of the user-specified name is generated file.
  • the files 1 to 4 are all backed up in the backup directory.
  • the Linux-based data processing method determines whether the current system environment meets the conditions for data backup while the system is running, and when the current system environment meets the conditions, the backup is performed without restarting the system.
  • the data to be backed up in the system breaks through the traditional system data backup mode that needs to restart the system to back up data.
  • step S20 includes:
  • the server can obtain a list of skippable files according to the user's selection.
  • the skippable file may be an IP configuration file, a hostname configuration file, or the like.
  • the system metadata includes an MBR information file, a partition table information file, an LVM information file, and a file system information file.
  • the preset first directory is a backup directory created or designated by a user. Used to store all data to be backed up under the first directory.
  • the Linux-based data processing method provided by the embodiment of the present invention can specify a system file that can be skipped during data recovery when the data is backed up, and provides early support for different systems having different system configurations when the system is installed or restored in batches.
  • a third embodiment of the Linux-based data processing method of the present invention is proposed based on the second embodiment.
  • the Linux-based data processing method further includes:
  • the auxiliary system is composed of a kernel, a command set, a dynamic library, a driver module, a backup and recovery module, a boot support module, a build module, a root file system, and the like.
  • the kernel is the core of the auxiliary system, which can implement basic operating system functions and provide service primitives upwards; the command set adopts dynamic compilation; the command in the command set needs dynamic library support during execution; the driver module can Ensure that the auxiliary system supports different hardware environments to achieve consistency of the boot process under different hardware configurations; the backup and recovery module can start a data backup program or a data recovery program according to the user's selection; the startup support module cooperates with the kernel to complete The process of powering on the system; the building module is a description of the way the data backup and recovery process is built; the root file system mainly provides the mount directory of the proc file system, the devpts file system, and the .sysfs file system, basic command sets and dynamics.
  • the directory where the library is located the directory where the kernel modules and hardware driver sets are located, the directory where the specific configuration required for the secondary system is started, and so on.
  • the kernel adopts the Linux 2.6.3 version, and based on this, the vmlinuz kernel image and the current mainstream hardware driver set files are built.
  • auxiliary system There are various startup modes of the auxiliary system, such as U disk boot, CD boot, disk boot, network boot, and the like.
  • the same auxiliary system can be accessed in different startup modes.
  • the startup mode of the auxiliary system is the network startup
  • the client sends a DHCP (Dynamic Host Configuration Protocol) broadcast to the network through a network card supporting the PXE (Preboot Execute Environment).
  • the DHCP server After receiving the request, the DHCP server provides the client with information such as an IP address, and then the client requests to download the kernel image file of the auxiliary system according to the IP address information and starts loading the auxiliary system after the download is completed.
  • DHCP Dynamic Host Configuration Protocol
  • the operating parameter includes a startup mode of the auxiliary system and a storage path of the image file in the startup mode.
  • the vmlinuz kernel of the auxiliary system is loaded according to a bootloader corresponding to different startup modes, and the initrd (initial RAM disk) of the auxiliary system is decompressed by the vmlinuz kernel. Scanning the hardware of the server to be restored, triggering the device manager udev event, and loading the hardware driver corresponding to the hardware of the server to be restored according to the udev event.
  • the to-be-recovered server After receiving the data recovery instruction, acquires the system startup parameter of the auxiliary system, according to the startup mode of the auxiliary system obtained by the parsing and the storage path of the image file in the startup mode, from the The storage path gets the image file.
  • the method of obtaining an image file can be obtained by local disk, U disk acquisition, CD acquisition, and network server acquisition.
  • the network server provides network related services, such as a DHCP service, a UDP (User Datagram Protocol) service, an FTP (File Transfer Protocol) service, an NFS (Network File System) service, and the like. .
  • the file system of the local disk is mounted to the preset second directory according to the path of the parsed image file on the local disk, and the second file is Obtaining an image file in the directory;
  • the boot mode of the auxiliary system is the booting of the USB disk, mounting the USB disk to the second according to the storage path of the parsed image file on the USB disk a directory, and obtaining an image file from the second directory;
  • the parsed boot mode of the auxiliary system is booting from a disc, mounting the disc according to a storage path of the parsed image file on the optical disc to
  • the second directory obtains an image file from the second directory; when the parsed startup mode of the auxiliary system is network startup, the udpcast is transmitted according to the storage path of the parsed image file on the UDP server.
  • the file (the input parameter includes the storage path of the image file on the UDP server); when the parsed startup mode of the auxiliary system is the network startup, according to the parsed mirror image In the storage path on the FTP server, use wget to transfer files (the input parameters include the storage path of the image file on the FTP server); when the resolved startup mode of the auxiliary system is network startup, according to the parsed image file in NFS A storage path on the server, mounting NFS to the second directory, and obtaining an image file from the second directory.
  • the preset second directory is a directory created and specified by the data recovery program for storing data decompressed by the image file.
  • the image file When the image file is decompressed, it is sequentially determined according to the skippable file list whether the decompressed file is a skippable file; when the decompressed file is a skippable file, the recovery operation of the file is skipped. And continue to determine whether the next file is a skippable file; when the extracted file is not a skippable file, restore the file to the second directory, and then continue to determine whether the next file is a skippable file.
  • the image processing method of the embodiment of the present invention is based on the image file generated in the second embodiment, and the image file is restored according to the image file when the image file is restored to the server to be restored.
  • the decompressed list of skippable files selectively recovers data, and can override the user-specified system configuration file, so that different servers have different configurations when the system is installed or restored in batches.
  • step S50 includes:
  • the dd command is used to restore the MBR to the current system to be restored.
  • the auxiliary system includes boot_disk in the kernel boot parameter, it is determined that the image file is obtained from a local backup of the current system to be restored, that is, the partition table information and the file system information in the image file are currently waiting for The information in the recovery system is completely consistent. At this time, the data is recovered.
  • the program skips operations related to restoring partitions and file systems.
  • the number of the obtained partitions is the same as the number of partitions in the partition table information of the image file; the obtained types of the partitions are the same as the types of the partitions in the partition table information of the image file;
  • the size of the obtained partitions in the disk of the server to be restored is the same as the size of each partition in the backup server disk in the partition table information of the image file, for example, the disk size of the backup server is 100G, and the partition is 1 is 20G, and the disk size of the server to be restored at recovery is 200G, and the restored partition 1 is 40G.
  • the fdisk tool can be used to partition the disk of the current system to be restored.
  • the Linux-based data processing method according to the size proportion of each partition in the decompressed partition table information on the backup server disk, the server disk of the system to be restored is proportionally partitioned, and the disk of the server to be restored can be When the size of the backup server's disk is smaller, avoid the partition is not enough, or avoid the waste of space when the disk size of the server to be restored is larger than the disk size of the backup server.
  • the fifth embodiment of the data processing method of the present invention is based on the third or fourth embodiment.
  • the Linux-based data processing method further includes:
  • boot partition After the root file directory switch is completed, check if the boot partition is mounted. When it is checked that the boot partition is not mounted, the boot partition is mounted to obtain an initrd file stored in the boot partition.
  • the predetermined file refers to a basic command file, a dynamic library file, a configuration file, a driver file, and the like obtained by parsing from the initrd file.
  • the Linux-based data processing method provided by the embodiment of the present invention can dynamically generate an initrd file containing hardware driver information of the current system to be restored when the system is restored, so that the generated image file can be backed up on one machine. For restoring machines of other different types of hardware.
  • the embodiment of the present invention further provides a data processing apparatus based on Linux.
  • a functional module diagram of a first embodiment of a data processing apparatus based on Linux according to the present invention is shown, including:
  • the receiving module 110 is configured to receive a data backup instruction
  • the receiving module 110 of the server receives an instruction to trigger the data backup.
  • the detecting module 120 is configured to detect whether the current system environment satisfies a condition for performing data backup while the system continues to operate;
  • the receiving module 110 of the server After receiving the trigger data backup, the receiving module 110 of the server will detect whether the current system environment satisfies the condition for data backup while the system continues to run. Check whether the current system environment meets the conditions for data backup while the system continues to run, that is, whether the current system affects data backup occurs.
  • the detecting module 120 can determine whether the current system satisfies the condition for performing data backup while the system continues to run by detecting whether the current system is in the process of reading or writing memory data or having a hard disk error. When any of the above situations occur, the server does not start the data backup program and gives a related prompt message; when none of the above occurs, the server starts the data backup program to perform data backup.
  • the backup module 130 is configured to package all the data to be backed up and generate an image file when the current system environment satisfies the condition of data backup while the system continues to run.
  • the backup module 130 detects the mode while performing the data backup operation.
  • the block 120 detects in real time whether the current system environment satisfies the condition for data backup while the system continues to run.
  • the backup module 130 suspends the data backup operation. And when it is detected that the current system environment satisfies the condition of data backup while the system continues to run, the backup module 130 continues the previously suspended operation.
  • the data to be backed up may be system data, or may be system data and file system data, and is determined according to a user's selection.
  • the backup module 130 performs parameter parsing, obtains parameter information such as the backup directory specified by the user and the name of the generated image file; and then, after scanning the disk to find the boot partition, Use the dd command to back up the first 512 bytes of the boot disk to file 1, that is, back up the MBR information to the file 1; use the fdisk tool to back up the system partition table information to the file 2; obtain the LVM related information of the system (including the physical volume information, Volume group information, logical volume information), and back up the logical volume information to file 3; collect the file system information of the system (including file system type, Label, UUID), and back up the collected information to file 4; read Take /proc/mounts, obtain the file system mount information of the system, and mount the file system of all disks to
  • the Linux-based data processing apparatus determines whether the current system environment meets the conditions for data backup while the system is running, and when the current system environment meets the conditions, the backup is performed without restarting the system.
  • the data to be backed up in the system breaks through the traditional system data backup mode that needs to restart the system to back up data.
  • the backup module 130 includes:
  • the obtaining unit 131 is configured to obtain a skippable file list
  • the server can obtain a list of skippable files according to the user's selection.
  • the skippable file may be an IP configuration file, a hostname configuration file, or the like.
  • the backup unit 132 is configured to store the skippable file list and all system metadata to be backed up to a preset first directory
  • the system metadata includes an MBR information file, a partition table information file, and an LVM information file.
  • the preset first directory is a backup directory created or designated by the user, and is used to store all the data to be backed up under the first directory.
  • the obtaining unit 131 is further configured to acquire file system mount information of the current system
  • the backup unit 132 is further configured to mount the corresponding file system to the first directory according to the mounting information
  • the packaging unit 133 is configured to package the file to be backed up into the first directory and generate an image file of a preset name.
  • the Linux-based data processing apparatus provided by the embodiment of the present invention can specify a system file that can be skipped during data recovery when the data is backed up, and provides preliminary support for different systems having different system configurations when the system is installed or restored in batches.
  • the Linux-based data processing apparatus further includes:
  • the receiving module 110 is further configured to receive a data recovery instruction
  • the auxiliary system is composed of a kernel, a command set, a dynamic library, a driver module, a backup and recovery module, a boot support module, a build module, a root file system, and the like.
  • the kernel is the core of the auxiliary system, which can implement basic operating system functions and provide service primitives upwards; the command set adopts dynamic compilation; the command in the command set needs dynamic library support during execution; the driver module can Ensure that the auxiliary system supports different hardware environments to achieve consistency of the boot process under different hardware configurations; the backup and recovery module can start a data backup program or a data recovery program according to the user's selection; the startup support module cooperates with the kernel to complete The process of powering on the system; the building module is a description of the way the data backup and recovery process is built; the root file system mainly provides the mount directory of the proc file system, the devpts file system, and the .sysfs file system, basic command sets and dynamics.
  • the directory where the library is located the directory where the kernel modules and hardware driver sets are located, the directory where the specific configuration required for the secondary system is started, and so on.
  • the kernel adopts the Linux 2.6.3 version, and based on this, the vmlinuz kernel image and the current mainstream hardware driver set files are built.
  • auxiliary system There are various startup modes of the auxiliary system, such as U disk boot, CD boot, disk boot, network boot, and the like.
  • the same auxiliary system can be accessed in different startup modes.
  • the startup mode of the auxiliary system is network startup, the client sends a request DHCP to the network through a network card supporting PXE. Broadcasting, after receiving the request, the DHCP server provides the client with information such as an IP address, and then the client requests to download the kernel image file of the auxiliary system according to the IP address information and initiate loading after the download is completed.
  • auxiliary system When the startup mode of the auxiliary system is network startup, the client sends a request DHCP to the network through a network card supporting PXE. Broadcasting, after receiving the request, the DHCP server provides the client with information such as an IP address, and then the client requests to download the kernel image file of the auxiliary system according to the IP address information and initiate loading after the download is completed.
  • auxiliary system auxiliary system.
  • the operating parameter includes a startup mode of the auxiliary system and a storage path of the image file in the startup mode.
  • the vmlinuz kernel of the auxiliary system is loaded according to a bootloader corresponding to different startup modes, and the initrd file of the auxiliary system is decompressed by the vmlinuz kernel; and the server to be restored is scanned.
  • the hardware triggers the udev event, and loads the hardware driver corresponding to the hardware of the server to be restored according to the udev event.
  • the receiving module 110 will receive the data recovery instruction.
  • the obtaining module 140 is configured to acquire an image file according to the data recovery instruction
  • the acquiring module 110 of the to-be-recovered server After receiving the data recovery instruction, acquires the system startup parameter of the auxiliary system, and according to the initialization mode of the auxiliary system obtained by the parsing and the image file in the startup mode. The storage path from which the image file is obtained.
  • the method of obtaining an image file can be obtained by local disk, U disk acquisition, CD acquisition, and network server acquisition.
  • the network server provides network related services, such as a DHCP service, a UDP service, an FTP service, an NFS service, and the like.
  • the obtaining module 140 mounts the file system of the local disk to the preset second directory according to the path of the parsed image file on the local disk, and Obtaining an image file in the second directory; when the boot mode of the auxiliary system is the booting of the USB disk, the obtaining module 140 mounts the U according to the storage path of the parsed image file on the USB disk.
  • the storage path is configured to mount the optical disc to the second directory, and obtain an image file from the second directory; when the parsed startup mode of the auxiliary system is network startup, the obtaining module 140 is configured according to the parsed image.
  • File storage path on the UDP server using udpcast to transfer files (input parameters include the storage path of the image file on the UDP server); in the parsing of the auxiliary system
  • the obtaining module 140 uses the wget to transfer the file according to the storage path of the parsed image file on the FTP server (the input parameter includes the storage path of the image file on the FTP server); and the auxiliary system is parsed
  • the startup method is network startup
  • the acquiring module 140 mounts the NFS to the second directory according to the storage path of the parsed image file on the NFS server, and obtains the image file from the second directory.
  • the processing module 150 is configured to decompress the image file, thereby obtaining system metadata, file system mount information, a skippable file list, and a file to be restored;
  • the obtaining module 140 is further configured to obtain the decompressed system metadata
  • the recovery module 160 is configured to restore the system metadata to the current system to be restored
  • the obtaining module 140 is further configured to obtain the decompressed file system mount information.
  • the recovery module 160 is further configured to mount the related file system to the preset second directory according to the file system mounting information
  • the preset second directory is a directory created and specified by the data recovery program for storing data decompressed by the image file.
  • the obtaining module 140 is further configured to obtain the decompressed list of the skippable files
  • the recovery module 160 is further configured to restore the decompressed files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
  • the recovery module 160 When decompressing the image file, the recovery module 160 sequentially determines, according to the skippable file list, whether the decompressed file is a skippable file; when the decompressed file is a skippable file, the recovery module 160 skips the pair The recovery operation of the file continues to determine whether the next file is a skippable file; when the extracted file is not a skippable file, the recovery module 160 restores the file to the second directory, and then continues to judge Whether a file is a skippable file.
  • the image processing apparatus of the embodiment of the present invention is based on the image file generated in the second embodiment, and the image file is restored according to the image file when the image file is restored to the server to be restored.
  • the decompressed list of skippable files selectively recovers data, and can override the user-specified system configuration file, so that different servers have different configurations when the system is installed or restored in batches.
  • the recovery module 160 includes:
  • the recovery unit 161 is configured to restore the MBR according to the acquired system metadata
  • the recovery unit 161 Based on the MBR information in the obtained system metadata, the recovery unit 161 recovers using the dd command. MBR to the current system to be restored.
  • the calculating unit 162 is configured to calculate a disk of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored when the image file is not acquired locally from the current system to be restored. Partition ratio
  • the auxiliary system includes boot_disk in the kernel boot parameter, it is determined that the image file is obtained from a local backup of the current system to be restored, that is, the partition table information and the file system information in the image file are currently waiting for The information in the recovery system is completely consistent. At this time, the data recovery program skips the operations related to the recovery partition and the file system.
  • the calculating unit 162 acquires the partition table information in the system metadata, and obtains the desired partition according to the partition table information and the disk information of the current system to be restored. Information such as the number, type of each partition, and partition size.
  • the number of the obtained partitions is the same as the number of partitions in the partition table information of the image file; the obtained types of the partitions are the same as the types of the partitions in the partition table information of the image file;
  • the size of the obtained partitions in the disk of the server to be restored is the same as the size of each partition in the backup server disk in the partition table information of the image file, for example, the disk size of the backup server is 100G, and the partition is 1 is 20G, and the disk size of the server to be restored at recovery is 200G, and the restored partition 1 is 40G.
  • the partitioning unit 163 is configured to partition the disk of the current system to be restored according to the disk partition ratio
  • the partition unit 163 can use the fdisk tool to partition the disk of the current system to be restored.
  • the recovery unit 161 is further configured to restore the LVM and the file system according to the system metadata after the disk partition is completed.
  • the recovery unit 161 When recovering the LVM, the recovery unit 161 recreates the pv using the pvcreate command according to the LVM information in the system metadata, recreates the vg using the vgcreate command, and recreates the lv using the lvcreate command.
  • the recovery unit 161 When restoring the file system, the recovery unit 161 recreates the file system using the corresponding file system formatting tool according to the file system information in the system metadata, and specifies the UUID and Label of the file system when formatting.
  • the Linux-based data processing apparatus performs the server disk of the system to be restored according to the size proportion of each partition in the decompressed partition table information on the backup server disk.
  • Proportional partitioning avoids space shortage when the disk size of the server to be restored is smaller than that of the backup server, or when the disk size of the server to be restored is larger than that of the backup server.
  • the Linux-based data processing apparatus further includes:
  • the processing module 150 is further configured to switch the root file directory of the current system to be restored to the second directory;
  • the processing module 150 can use the chroot command to switch the root file directory of the current system to be restored to the second directory.
  • the initrd production module 170 is configured to mount the boot partition and parse the initrd file when the boot partition is not mounted;
  • the initrd creation module 170 checks if the boot partition is mounted. When it is checked that the boot partition is not mounted, the initrd making module 170 mounts the boot partition to obtain an initrd file stored in the boot partition.
  • the obtaining module 140 is further configured to acquire hardware driver information that has been loaded by the current system to be restored;
  • the initrd making module 170 is further configured to package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
  • the predetermined file refers to a basic command file, a dynamic library file, a configuration file, a driver file, and the like obtained by parsing from the initrd file.
  • the processing module 150 is further configured to replace the initrd file of the current system to be restored with the newly generated initrd file;
  • the restart module 180 is configured to restart the current system to be restored.
  • the Linux-based data processing apparatus can dynamically generate an initrd file containing the hardware driver information of the current system to be restored when the system is restored, so that the generated image file can be backed up on one machine. For restoring machines of other different types of hardware.
  • the embodiment of the present invention further provides a Linux-based data processing system, as shown in FIG.
  • FIG. A schematic diagram of a structure of a first embodiment of a Linux-based data processing system, including an image file storage medium 100 and a backup and recovery server 200, wherein the backup and recovery server 200 includes any of the above embodiments.
  • a Linux-based data processing apparatus the Linux-based data processing apparatus on the backup and recovery server 200 is configured to back up data on the backup and recovery server 200 as an image file and store the image file On the local or the image file storage medium 100, the image file is decompressed and the data is restored to the backup and recovery server 200 when the data needs to be restored.
  • the backup and recovery server 200 may be a server configured to back up data and configured to restore the backup data to a local server, or a server cluster including a backup server and one or more recovery servers.
  • the image file storage medium 100 may be a USB flash drive, an optical disk, a web server, or the like.
  • the Linux-based data processing system proposed by the embodiment of the present invention supports backing up data to be backed up without restarting the system, and can selectively process system configuration data, and considers that the image file generated by the same backup system is to be used.
  • the application of different hardware machines has been compatible with the differences in disk size and hardware drivers, which is convenient for users to perform one-click recovery and batch deployment systems, greatly improving the flexibility of engineering applications.
  • the image file storage medium includes a USB flash drive, an optical disk, and a network server
  • the Linux-based data processing device supports
  • the mirror file storage medium is also supported to store the image file for backup or recovery.
  • the Linux-based data processing method disclosed in the present application includes: after receiving a data backup instruction, Check whether the current system environment meets the conditions for data backup while the system continues to run; when the current system environment satisfies the conditions for data backup while the system continues to run, all the data to be backed up is packaged and an image file is generated.
  • the present application also discloses a Linux-based data processing apparatus and system. This application implements data backup while the Linux system continues to run.

Abstract

Disclosed is a method for data processing based on Linux, comprising: detecting, after receiving a data backup instruction, whether the current system environment satisfies the conditions for data backup while the system continues operation; when the current system environment satisfies the conditions for data backup while the system continues operation, packaging all data to be backed up and generating an image file. Further disclosed are a device and a system for data processing based on Linux. This realizes data backup while the Linux system continues operation.

Description

基于Linux的数据处理方法、装置和系统Linux-based data processing method, device and system 技术领域Technical field
本申请涉及信息安全技术领域,例如涉及一种基于Linux的数据处理方法、装置和系统。The present application relates to the field of information security technologies, for example, to a Linux-based data processing method, apparatus, and system.
背景技术Background technique
在计算机硬件和计算机网络高速发展的环境下,磁盘作为计算机系统的主要数据存储介质,存放着用户长期累积的有用数据。然而,磁盘硬件故障、用户误操作、黑客入侵等因素直接威胁着磁盘上的数据安全。采用数据备份及恢复技术可保证数据的安全。数据备份及恢复技术是使用存储介质和一定的安全策略,将系统数据和业务数据备份下来,并在数据出现异常时尽快恢复数据,以尽量降低用户的损失。In the environment of rapid development of computer hardware and computer networks, disks, as the main data storage medium of computer systems, store useful data accumulated by users for a long time. However, disk hardware failures, user misuse, hacking and other factors directly threaten the data security on the disk. Data backup and recovery technology ensures data security. Data backup and recovery technology uses storage media and certain security policies to back up system data and business data, and restore data as soon as possible when data is abnormal, in order to minimize user losses.
基于Linux的数据备份及恢复技术,提供了诸如tar、cpio、dump等工具来实现数据的备份或恢复。然而,在Linux系统上进行系统数据备份时,往往需要通过重启系统才能进行数据备份,使得用户不得不停止系统当前的应用,等待系统重启后再进行数据备份。Linux-based data backup and recovery technology, such as tar, cpio, dump and other tools to achieve data backup or recovery. However, when performing system data backup on a Linux system, it is often necessary to restart the system to perform data backup, so that the user has to stop the current application of the system and wait for the system to restart before performing data backup.
发明内容Summary of the invention
本发明实施例提供一种基于Linux的数据处理方法、装置和系统,可以解决在Linux系统上进行系统数据备份时,需要通过重启系统才能进行数据备份的问题。The embodiment of the invention provides a data processing method, device and system based on Linux, which can solve the problem that data backup can be performed by restarting the system when performing system data backup on a Linux system.
本发明实施例提供一种基于Linux的数据处理方法,包括:An embodiment of the present invention provides a data processing method based on Linux, including:
在接收到数据备份指令后,检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;After receiving the data backup instruction, detecting whether the current system environment satisfies the condition for performing data backup while the system continues to run;
在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。When the current system environment satisfies the conditions for data backup while the system continues to run, all the data to be backed up is packaged and an image file is generated.
所述在当前系统环境满足在系统继续运行的同时进行数据备份的条件时, 打包所有的待备份数据并生成镜像文件可以包括:When the current system environment satisfies the conditions for data backup while the system continues to operate, Packaging all the data to be backed up and generating the image file can include:
获取可跳过文件列表,并将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;Obtaining a skippable file list, and storing the skippable file list and all system metadata to be backed up in a preset first directory;
获取当前系统的文件系统挂载信息,并根据所述挂载信息将相应文件系统挂载到所述第一目录;Obtaining file system mount information of the current system, and mounting the corresponding file system to the first directory according to the mount information;
将待备份文件打包到所述第一目录并生成预设名称的镜像文件。The file to be backed up is packaged into the first directory and an image file of a preset name is generated.
所述基于Linux的数据处理方法还可以包括:The Linux-based data processing method may further include:
在接收到数据恢复指令后,根据所述数据恢复指令获取镜像文件;After receiving the data recovery instruction, acquiring an image file according to the data recovery instruction;
解压所述镜像文件,从而获得系统元数据、文件系统挂载信息、可跳过文件列表和待恢复文件;Decompressing the image file to obtain system metadata, file system mount information, a skippable file list, and a file to be restored;
获取解压出的所述系统元数据,并恢复所述系统元数据到当前待恢复系统;Obtaining the decompressed system metadata, and restoring the system metadata to a current system to be restored;
获取解压出的所述文件系统挂载信息,并根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;Obtaining the extracted file system mount information, and mounting the related file system to a preset second directory according to the file system mount information;
获取解压出的所述可跳过文件列表,并根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。Obtaining the extracted list of skippable files, and restoring the unrecovered files that are not extracted in the skippable file list to the second directory according to the skippable file list.
所述获取解压出的所述系统元数据,并恢复所述系统元数据到当前待恢复系统可以包括:The obtaining the decompressed system metadata and restoring the system metadata to the current system to be restored may include:
根据所述获取的系统元数据恢复MBR;Recovering the MBR according to the acquired system metadata;
在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;When the image file is not obtained locally from the current system to be restored, the disk partition ratio of the current system to be restored is calculated according to the partition table information in the system metadata and the disk information of the current system to be restored;
根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区;According to the disk partition ratio, the disk of the current system to be restored is partitioned;
在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。After the disk partition is completed, the LVM and file system are restored according to the system metadata.
所述获取解压出的所述可跳过文件列表,并根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录的步骤之后,所述基于Linux的数据处理方法还可以包括:Obtaining the decompressed list of the skippable files, and recovering the extracted files to be recovered in the skippable file list to the second directory according to the skippable file list The Linux-based data processing method may further include:
切换当前待恢复系统的根文件目录为所述第二目录; Switching the root file directory of the current system to be restored to the second directory;
在boot分区未挂载时,挂载所述boot分区并解析initrd文件;When the boot partition is not mounted, mount the boot partition and parse the initrd file;
获取当前待恢复系统已经加载的硬件驱动信息,并将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;Obtaining hardware driver information that has been loaded by the current system to be restored, and packaging the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
将当前待恢复系统的initrd文件替换为新生成的initrd文件,并重启当前待恢复系统。Replace the initrd file of the current system to be restored with the newly generated initrd file, and restart the current system to be restored.
本发明实施例还提供一种基于Linux的数据处理装置,包括:The embodiment of the invention further provides a data processing device based on Linux, comprising:
接收模块,被配置为接收数据备份指令;a receiving module configured to receive a data backup instruction;
检测模块,被配置为检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;a detection module configured to detect whether a current system environment satisfies a condition for performing data backup while the system continues to operate;
备份模块,被配置为在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。The backup module is configured to package all the data to be backed up and generate an image file when the current system environment satisfies the conditions for data backup while the system continues to run.
所述备份模块可以包括:The backup module can include:
获取单元,被配置为获取可跳过文件列表;An obtaining unit configured to obtain a list of skippable files;
备份单元,被配置为将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;a backup unit configured to store the skippable file list and all system metadata to be backed up to a preset first directory;
所述获取单元,还被配置为获取当前系统的文件系统挂载信息;The obtaining unit is further configured to acquire file system mounting information of the current system;
所述备份单元,还被配置为根据所述挂载信息将相应文件系统挂载到所述第一目录;The backup unit is further configured to mount the corresponding file system to the first directory according to the mounting information;
打包单元,被配置为将待备份文件打包到所述第一目录并生成预设名称的镜像文件。The packaging unit is configured to package the file to be backed up into the first directory and generate an image file of a preset name.
所述基于Linux的数据处理装置还可以包括:The Linux-based data processing apparatus may further include:
所述接收模块,还被配置为接收数据恢复指令;The receiving module is further configured to receive a data recovery instruction;
获取模块,被配置为根据所述数据恢复指令获取镜像文件;An obtaining module configured to acquire an image file according to the data recovery instruction;
处理模块,被配置为解压所述镜像文件,从而获得系统元数据、文件系统挂载信息、可跳过文件列表和待恢复文件;a processing module configured to decompress the image file to obtain system metadata, file system mount information, a skippable file list, and a file to be restored;
所述获取模块,还被配置为获取解压出的所述系统元数据;The obtaining module is further configured to obtain the decompressed system metadata;
恢复模块,被配置为恢复所述系统元数据到当前待恢复系统; a recovery module configured to restore the system metadata to a current system to be restored;
所述获取模块,还被配置为获取解压出的所述文件系统挂载信息;The obtaining module is further configured to obtain the decompressed file system mounting information;
所述恢复模块,还被配置为根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;The recovery module is further configured to mount the related file system to a preset second directory according to the file system mounting information;
所述获取模块,还被配置为获取解压出的所述可跳过文件列表;The obtaining module is further configured to obtain the decompressed list of the skippable files;
所述恢复模块,还被配置为根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。The recovery module is further configured to restore the extracted files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
所述恢复模块可以包括:The recovery module can include:
恢复单元,被配置为根据所述获取的系统元数据恢复MBR;a recovery unit configured to recover the MBR according to the acquired system metadata;
计算单元,被配置为在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;The calculating unit is configured to calculate a disk partition of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored when the image file is not obtained locally from the current system to be restored. proportion;
分区单元,被配置为根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区;a partition unit configured to partition a disk of the current system to be restored according to the disk partition ratio;
所述恢复单元,还被配置为在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。The recovery unit is further configured to restore the LVM and the file system according to the system metadata after the disk partition is completed.
所述基于Linux的数据处理装置还可以包括:The Linux-based data processing apparatus may further include:
所述处理模块,还被配置为切换当前待恢复系统的根文件目录为所述第二目录;The processing module is further configured to switch the root file directory of the current system to be restored to the second directory;
initrd制作模块,被配置为在boot分区未挂载时,挂载所述boot分区并解析initrd文件;The initrd production module is configured to mount the boot partition and parse the initrd file when the boot partition is not mounted;
所述获取模块,还被配置为获取当前待恢复系统已经加载的硬件驱动信息;The obtaining module is further configured to acquire hardware driver information that has been loaded by the current system to be restored;
所述initrd制作模块,还被配置为将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;The initrd production module is further configured to package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
所述处理模块,还被配置为将当前待恢复系统的initrd文件替换为新生成的initrd文件;The processing module is further configured to replace the initrd file of the current system to be restored with the newly generated initrd file;
重启模块,被配置为重启当前待恢复系统。The module is restarted and configured to restart the current system to be restored.
本发明实施例还提供一种基于Linux的数据处理系统。所述基于Linux的数 据处理系统包括镜像文件存储介质、备份及恢复服务器。所述备份及恢复服务器包括上述基于Linux的数据处理装置;所述备份及恢复服务器上的所述基于Linux的数据处理装置被配置为将所述备份及恢复服务器上的数据备份为镜像文件,并将所述镜像文件存储在本地或所述镜像文件存储介质上,在需要恢复数据时将所述镜像文件经过解压后恢复其数据到所述备份及恢复服务器。The embodiment of the invention also provides a Linux-based data processing system. The Linux based number The processing system includes an image file storage medium, a backup and recovery server. The backup and recovery server includes the above-described Linux-based data processing device; the Linux-based data processing device on the backup and recovery server is configured to back up data on the backup and recovery server as an image file, and The image file is stored locally or on the image file storage medium, and the image file is decompressed and the data is restored to the backup and recovery server when the data needs to be restored.
所述镜像文件存储介质可以包括U盘、光盘、网络服务器;所述基于Linux的数据处理装置除支持本地存储镜像文件进行备份或恢复的方式外,还同时支持任一所述镜像文件存储介质存储所述镜像文件进行备份或恢复的方式。The image file storage medium may include a USB flash drive, an optical disk, and a network server. The Linux-based data processing device supports any of the image file storage media storage in addition to the manner of supporting the local storage image file for backup or recovery. The manner in which the image file is backed up or restored.
本发明实施例提出的基于Linux的数据处理方法、装置和系统,在数据备份时,通过分析当前系统环境的运行情况,在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,实现在不重启系统的情况下对待备份的数据进行数据备份,突破了传统的需要重启系统才能备份数据的系统数据备份方式。The method, device and system for processing data based on Linux according to the embodiment of the present invention, when analyzing data of the current system environment during data backup, when the current system environment satisfies the condition of data backup while the system continues to operate, Data backup of the data to be backed up without restarting the system breaks through the traditional system data backup method that requires the system to be restarted to back up data.
附图概述BRIEF abstract
图1为本发明基于Linux的数据处理方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a data processing method based on Linux according to the present invention;
图2为本发明基于Linux的数据处理方法第二实施例中打包所有的待备份数据并生成镜像文件的细化流程示意图;2 is a schematic diagram of a refinement process of packing all the data to be backed up and generating an image file in the second embodiment of the data processing method based on Linux according to the present invention;
图3为本发明基于Linux的数据处理方法第三实施例中数据恢复的流程示意图;3 is a schematic flowchart of data recovery in a third embodiment of a data processing method based on Linux according to the present invention;
图4为基于Linux的数据处理方法第四实施例中恢复系统元数据到待恢复系统的细化流程示意图;4 is a schematic diagram of a refinement process of restoring system metadata to a system to be restored in a fourth embodiment of a Linux-based data processing method;
图5为基于Linux的数据处理方法第五实施例中制作initrd文件的细化流程示意图;5 is a schematic diagram of a refinement process of creating an initrd file in a fifth embodiment of a data processing method based on Linux;
图6为基于Linux的数据处理装置第一实施例的功能模块示意图;6 is a schematic diagram of functional modules of a first embodiment of a data processing apparatus based on Linux;
图7为基于Linux的数据处理装置第二实施例中备份模块的细化功能模块示意图; 7 is a schematic diagram of a refinement function module of a backup module in a second embodiment of a Linux-based data processing device;
图8为基于Linux的数据处理装置第三实施例的功能模块示意图;8 is a schematic diagram of functional modules of a third embodiment of a Linux-based data processing apparatus;
图9为基于Linux的数据处理装置第四实施例中恢复模块的细化功能模块示意图;9 is a schematic diagram of a refinement function module of a recovery module in a fourth embodiment of a data processing apparatus based on Linux;
图10为基于Linux的数据处理装置第五实施例的功能模块示意图;10 is a schematic diagram of functional modules of a fifth embodiment of a Linux-based data processing apparatus;
图11为基于Linux的数据处理系统第一实施例的结构示意图。11 is a schematic structural diagram of a first embodiment of a Linux-based data processing system.
本发明方案的实现、功能特点及优点将结合实施例,参照附图进行说明。The implementation, functional features, and advantages of the present invention will be described with reference to the accompanying drawings.
本发明的实施方式Embodiments of the invention
应当理解,此处所描述的实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例提供一种基于Linux的数据处理方法,如图1所示,示出了本发明基于Linux的数据处理方法第一实施例的流程示意图,包括:The embodiment of the present invention provides a data processing method based on Linux. As shown in FIG. 1 , a schematic flowchart of a first embodiment of a data processing method based on Linux according to the present invention is shown, including:
S10、在接收到数据备份指令后,检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;S10. After receiving the data backup instruction, detecting whether the current system environment satisfies the condition for performing data backup while the system continues to run;
服务器在正常运行过程中,当用户通过命令行或界面操作等方式触发启动数据备份时,服务器在接收到触发数据备份的指今后,将检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件。检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件,即是检测当前系统是否有影响数据备份的情况发生。本实施例中,可通过检测当前系统是否有其他进程正在进行内存数据读写或有硬盘错误的情况发生来判断当前系统是否满足在系统继续运行的同时进行数据备份的条件。在有任一所述情况发生时,服务器不启动数据备份程序,并给出相关提示消息;在没有任一所述情况发生时,服务器启动数据备份程序进行数据备份。During normal operation, when the user triggers the startup data backup through the command line or interface operation, the server will detect whether the current system environment meets the data backup while the system continues to run. conditions of. Check whether the current system environment meets the conditions for data backup while the system continues to run, that is, whether the current system affects data backup occurs. In this embodiment, it can be determined whether the current system satisfies the condition for performing data backup while the system continues to run by detecting whether the current system has other memory processes that are reading or writing memory data or having a hard disk error. When any of the above situations occur, the server does not start the data backup program and gives a related prompt message; when none of the above occurs, the server starts the data backup program to perform data backup.
S20、在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。S20. When the current system environment satisfies the conditions for data backup while the system continues to run, all the data to be backed up is packaged and an image file is generated.
启动数据备份程序后,在进行数据备份操作的同时,服务器实时检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件,在检测到当前 系统环境不满足在系统继续运行的同时进行数据备份的条件时,暂停数据备份操作,并在检测到当前系统环境满足在系统继续运行的同时进行数据备份的条件时,继续之前暂停的操作。After the data backup program is started, while the data backup operation is being performed, the server detects in real time whether the current system environment satisfies the conditions for data backup while the system continues to run, and detects the current condition. The system environment does not meet the conditions for data backup while the system continues to run, suspending the data backup operation, and continuing the previously suspended operation when it detects that the current system environment satisfies the conditions for data backup while the system continues to run.
所述待备份数据可以为系统数据,也可以为系统数据和文件系统数据,根据用户的选择以确定。以系统数据和文件系统数据的备份为例,在Linux系统中,进行参数解析,获取用户指定的备份目录和生成的镜像文件名称等参数信息;然后在扫描磁盘查找到boot分区后,使用dd命令备份启动磁盘的首个512字节到文件1,即备份MBR(Master Boot Record,主引导记录)信息到所述文件1;使用fdisk工具备份系统分区表信息到文件2;获取系统的LVM(Logical Volume Manager,逻辑卷管理)相关信息(包括物理卷信息、卷组信息、逻辑卷信息),并将其中的逻辑卷信息备份到文件3;采集系统的文件系统信息(包括文件系统类型、文件系统标签Label、通用唯一识别码UUID),并将所采集的信息备份到文件4;读取/proc/mounts,获取系统的文件系统挂载信息,并根据所述文件系统挂载信息将所有磁盘的文件系统挂载到所述备份目录;之后,将所述备份目录进行打包并生成用户指定名称的镜像文件。其中,所述文件1-文件4均备份在所述备份目录中。The data to be backed up may be system data, or may be system data and file system data, and is determined according to a user's selection. Take the backup of system data and file system data as an example. In the Linux system, parameter analysis is performed to obtain parameter information such as the backup directory specified by the user and the name of the generated image file. Then, after scanning the disk to find the boot partition, use the dd command. Back up the first 512 bytes of the boot disk to file 1, that is, back up the MBR (Master Boot Record) information to the file 1; use the fdisk tool to back up the system partition table information to the file 2; obtain the LVM of the system (Logical Volume Manager, logical volume management) related information (including physical volume information, volume group information, logical volume information), and back up the logical volume information to file 3; collection system file system information (including file system type, file system) Label Label, Universal Unique Identification Number (UUID), and back up the collected information to file 4; read /proc/mounts, get the file system mount information of the system, and mount all the disks according to the file system mount information. a file system is mounted to the backup directory; after that, the backup directory is packaged and a mirror of the user-specified name is generated file. The files 1 to 4 are all backed up in the backup directory.
本发明实施例提出的基于Linux的数据处理方法,通过判断当前系统环境是否符合在系统运行的同时进行数据备份的条件,在当前系统环境符合所述条件时,实现在不重启系统的情况下备份所述系统中的待备份数据,突破了传统的需要重启系统才能备份数据的系统数据备份方式。The Linux-based data processing method provided by the embodiment of the present invention determines whether the current system environment meets the conditions for data backup while the system is running, and when the current system environment meets the conditions, the backup is performed without restarting the system. The data to be backed up in the system breaks through the traditional system data backup mode that needs to restart the system to back up data.
基于第一实施例提出本发明基于Linux的数据处理方法第二实施例,在本实施例中,如图2所示,上述步骤S20包括:A second embodiment of the Linux-based data processing method of the present invention is proposed based on the first embodiment. In this embodiment, as shown in FIG. 2, the foregoing step S20 includes:
S21、获取可跳过文件列表,并将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;S21: Obtain a skippable file list, and store the skippable file list and all system metadata to be backed up into a preset first directory;
数据备份程序启动后,在用户选择待备份数据时,会根据提示选择在系统恢复时可跳过的系统文件,即可以不恢复的系统文件。在用户选择所述可跳过的系统文件后,服务器即可根据用户的选择获得可跳过文件列表。本实施例中,所述可跳过文件可以是IP配置文件、hostname配置文件等。After the data backup program is started, when the user selects the data to be backed up, it will select the system file that can be skipped when the system is restored according to the prompt, that is, the system file that can be recovered. After the user selects the skippable system file, the server can obtain a list of skippable files according to the user's selection. In this embodiment, the skippable file may be an IP configuration file, a hostname configuration file, or the like.
所述系统元数据包括MBR信息文件,分区表信息文件,LVM信息文件,文件系统信息文件。所述预设的第一目录是由用户创建或指定的一个备份目录, 用于将所有的待备份数据存储到所述第一目录下。The system metadata includes an MBR information file, a partition table information file, an LVM information file, and a file system information file. The preset first directory is a backup directory created or designated by a user. Used to store all data to be backed up under the first directory.
S22、获取当前系统的文件系统挂载信息,并根据所述挂载信息将相应文件系统挂载到所述第一目录;S22. Obtain file system mount information of the current system, and mount the corresponding file system to the first directory according to the mount information.
S23、将待备份文件打包到所述第一目录并生成预设名称的镜像文件。S23. Package the file to be backed up into the first directory and generate an image file with a preset name.
本发明实施例提出的基于Linux的数据处理方法,能够在数据备份时由用户指定在数据恢复时可跳过的系统文件,为系统批量安装或恢复时实现不同服务器具有不同系统配置做前期支持。The Linux-based data processing method provided by the embodiment of the present invention can specify a system file that can be skipped during data recovery when the data is backed up, and provides early support for different systems having different system configurations when the system is installed or restored in batches.
基于第二实施例提出本发明基于Linux的数据处理方法第三实施例,在本实施例中,如图3所示,所述基于Linux的数据处理方法还包括:A third embodiment of the Linux-based data processing method of the present invention is proposed based on the second embodiment. In this embodiment, as shown in FIG. 3, the Linux-based data processing method further includes:
S30、在接收到数据恢复指令后,根据所述数据恢复指令获取镜像文件;S30. After receiving the data recovery instruction, acquire an image file according to the data recovery instruction.
用户使用镜像文件安装或恢复系统时,进入数据备份及恢复的辅助系统。所述辅助系统由内核、命令集、动态库、驱动模块、备份与恢复模块、启动支持模块、构建模块、根文件系统等构成。其中,内核是所述辅助系统的核心,能够实现基本的操作系统功能,并向上提供服务原语;命令集采用动态编译;所述命令集中的命令在执行时需要动态库的支持;驱动模块能够保证所述辅助系统对不同硬件环境的支持,以实现不同硬件配置下的启动过程的一致性;备份与恢复模块能够根据用户的选择启动数据备份程序或数据恢复程序;启动支持模块与内核配合完成系统上电启动的过程;构建模块是对数据备份及恢复过程的构建方式的描述;根文件系统主要提供proc文件系统、devpts文件系统和.sysfs文件系统等的挂载目录,基本命令集和动态库所在的目录,内核模块和硬件驱动集所在的目录,辅助系统在启动时所需的特定配置所在的目录等。本实施例中,内核采用Linux2.6.32版本,并以此为基础构建了vmlinuz内核镜像,以及当前主流的硬件驱动集文件。When the user installs or restores the system using the image file, it enters the auxiliary system for data backup and recovery. The auxiliary system is composed of a kernel, a command set, a dynamic library, a driver module, a backup and recovery module, a boot support module, a build module, a root file system, and the like. The kernel is the core of the auxiliary system, which can implement basic operating system functions and provide service primitives upwards; the command set adopts dynamic compilation; the command in the command set needs dynamic library support during execution; the driver module can Ensure that the auxiliary system supports different hardware environments to achieve consistency of the boot process under different hardware configurations; the backup and recovery module can start a data backup program or a data recovery program according to the user's selection; the startup support module cooperates with the kernel to complete The process of powering on the system; the building module is a description of the way the data backup and recovery process is built; the root file system mainly provides the mount directory of the proc file system, the devpts file system, and the .sysfs file system, basic command sets and dynamics. The directory where the library is located, the directory where the kernel modules and hardware driver sets are located, the directory where the specific configuration required for the secondary system is started, and so on. In this embodiment, the kernel adopts the Linux 2.6.3 version, and based on this, the vmlinuz kernel image and the current mainstream hardware driver set files are built.
所述辅助系统的启动方式有多种,如U盘启动、光盘启动、磁盘启动、网络启动等。在不同的启动方式下均可进入相同的辅助系统。在所述辅助系统的启动方式为网络启动时,客户机通过支持PXE(Preboot Execute Environment,预启动执行环境)的网卡向网络中发送请求DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)的广播,DHCP服务器在接收到所述请求后,给客户机提供IP地址等信息,然后客户机根据所述IP地址信息请求下载所述辅助系统的内核映像文件并在下载完成后启动加载所述辅助系统。 There are various startup modes of the auxiliary system, such as U disk boot, CD boot, disk boot, network boot, and the like. The same auxiliary system can be accessed in different startup modes. When the startup mode of the auxiliary system is the network startup, the client sends a DHCP (Dynamic Host Configuration Protocol) broadcast to the network through a network card supporting the PXE (Preboot Execute Environment). After receiving the request, the DHCP server provides the client with information such as an IP address, and then the client requests to download the kernel image file of the auxiliary system according to the IP address information and starts loading the auxiliary system after the download is completed.
所述辅助系统启动后会加载运行文件和具有系统恢复功能的进程,检查并解析运行参数。所述运行参数包括所述辅助系统的启动方式及在所述启动方式下镜像文件的存放路径。在待恢复服务器上启动所述辅助系统时,根据不同启动方式对应的bootloader加载所述辅助系统的vmlinuz内核,并通过所述vmlinuz内核解压所述辅助系统的initrd(Initial RAM Disk,初始RAM磁盘)文件;扫描所述待恢复服务器的硬件,触发设备管理器udev事件,根据udev事件加载所述待恢复服务器的硬件相应的硬件驱动。所述辅助系统启动完成后,由用户选择启动数据恢复程序。所述待恢复服务器在接收到数据恢复指令后,获取所述辅助系统的系统启动参数,根据解析得到的所述辅助系统的启动方式和在所述启动方式下镜像文件的存放路径,从所述存放路径获取镜像文件。After the auxiliary system is started, the running file and the system with the system recovery function are loaded, and the running parameters are checked and parsed. The operating parameter includes a startup mode of the auxiliary system and a storage path of the image file in the startup mode. When the auxiliary system is started on the server to be restored, the vmlinuz kernel of the auxiliary system is loaded according to a bootloader corresponding to different startup modes, and the initrd (initial RAM disk) of the auxiliary system is decompressed by the vmlinuz kernel. Scanning the hardware of the server to be restored, triggering the device manager udev event, and loading the hardware driver corresponding to the hardware of the server to be restored according to the udev event. After the startup of the auxiliary system is completed, the user selects to start the data recovery program. After receiving the data recovery instruction, the to-be-recovered server acquires the system startup parameter of the auxiliary system, according to the startup mode of the auxiliary system obtained by the parsing and the storage path of the image file in the startup mode, from the The storage path gets the image file.
获取镜像文件的方式可以为本地磁盘获取、U盘获取、光盘获取、网络服务器获取。所述网络服务器提供网络相关服务,如DHCP服务、UDP(User Datagram Protocol,用户数据报协议)服务、FTP(File Transfer Protocol,文件传输协议)服务、NFS(Network File System,网络文件系统)服务等。在解析出的所述辅助系统的启动方式为磁盘启动时,根据解析出的镜像文件在本地磁盘的存放路径,挂载本地磁盘的文件系统到预设的第二目录,并从所述第二目录中获取镜像文件;在解析出的所述辅助系统的启动方式为U盘启动时,根据解析出的镜像文件在所述U盘上的存放路径,挂载所述U盘到所述第二目录,并从所述第二目录获取镜像文件;在解析出的所述辅助系统的启动方式为光盘启动时,根据解析出的镜像文件在所述光盘上的存放路径,挂载所述光盘到所述第二目录,并从所述第二目录获取镜像文件;在解析出的所述辅助系统的启动方式为网络启动时,根据解析出的镜像文件在UDP服务器上的存放路径,使用udpcast传输文件(输入参数包括镜像文件在UDP服务器的存放路径);在解析出的所述辅助系统的启动方式为网络启动时,根据解析出的镜像文件在FTP服务器上的存放路径,使用wget传输文件(输入参数包括镜像文件在FTP服务器的存放路径);在解析出的所述辅助系统的启动方式为网络启动时,根据解析出的镜像文件在NFS服务器上的存放路径,挂载NFS到所述第二目录,并从所述第二目录中获取镜像文件。The method of obtaining an image file can be obtained by local disk, U disk acquisition, CD acquisition, and network server acquisition. The network server provides network related services, such as a DHCP service, a UDP (User Datagram Protocol) service, an FTP (File Transfer Protocol) service, an NFS (Network File System) service, and the like. . When the boot mode of the auxiliary system is the booting of the disk, the file system of the local disk is mounted to the preset second directory according to the path of the parsed image file on the local disk, and the second file is Obtaining an image file in the directory; when the boot mode of the auxiliary system is the booting of the USB disk, mounting the USB disk to the second according to the storage path of the parsed image file on the USB disk a directory, and obtaining an image file from the second directory; when the parsed boot mode of the auxiliary system is booting from a disc, mounting the disc according to a storage path of the parsed image file on the optical disc to The second directory obtains an image file from the second directory; when the parsed startup mode of the auxiliary system is network startup, the udpcast is transmitted according to the storage path of the parsed image file on the UDP server. The file (the input parameter includes the storage path of the image file on the UDP server); when the parsed startup mode of the auxiliary system is the network startup, according to the parsed mirror image In the storage path on the FTP server, use wget to transfer files (the input parameters include the storage path of the image file on the FTP server); when the resolved startup mode of the auxiliary system is network startup, according to the parsed image file in NFS A storage path on the server, mounting NFS to the second directory, and obtaining an image file from the second directory.
S40、解压所述镜像文件,从而获得系统元数据、文件系统挂载信息、可跳过文件列表和待恢复文件; S40. Decompress the image file to obtain system metadata, file system mount information, a skippable file list, and a file to be restored.
S50、获取解压出的所述系统元数据,并恢复所述系统元数据到当前待恢复系统;S50: Obtain the decompressed system metadata, and restore the system metadata to the current system to be restored;
S60、获取解压出的所述文件系统挂载信息,并根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;S60. Acquire the decompressed file system mount information, and mount the related file system to a preset second directory according to the file system mount information.
所述预设的第二目录是由所述数据恢复程序创建并指定的一个用于存放所述镜像文件解压出的数据的目录。The preset second directory is a directory created and specified by the data recovery program for storing data decompressed by the image file.
S70、获取解压出的所述可跳过文件列表,并根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。S70. Obtain the decompressed list of the skippable files, and restore the extracted files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
在解压所述镜像文件时,根据所述可跳过文件列表依次判断解压出的文件是否是可跳过文件;在解压出的文件是可跳过文件时,跳过对所述文件的恢复操作,继续判断下一个文件是否是可跳过文件;在解压出的文件不是可跳过文件时,将所述文件恢复到所述第二目录,然后继续判断下一个文件是否是可跳过文件。When the image file is decompressed, it is sequentially determined according to the skippable file list whether the decompressed file is a skippable file; when the decompressed file is a skippable file, the recovery operation of the file is skipped. And continue to determine whether the next file is a skippable file; when the extracted file is not a skippable file, restore the file to the second directory, and then continue to determine whether the next file is a skippable file.
本发明实施例提出的基于Linux的数据处理方法,所采用的镜像文件是基于上述第二实施例中生成的所述镜像文件,在恢复所述镜像文件到待恢复服务器时,根据所述镜像文件中解压出的可跳过文件列表有选择性地恢复数据,能够不覆盖用户指定的系统配置文件,从而在系统批量安装或恢复时使不同服务器具有不同配置。The image processing method of the embodiment of the present invention is based on the image file generated in the second embodiment, and the image file is restored according to the image file when the image file is restored to the server to be restored. The decompressed list of skippable files selectively recovers data, and can override the user-specified system configuration file, so that different servers have different configurations when the system is installed or restored in batches.
基于第三实施例提出本发明基于Linux的数据处理方法第四实施例,在本实施例中,如图4所示,上述步骤S50包括:A fourth embodiment of the data processing method based on Linux of the present invention is proposed based on the third embodiment. In this embodiment, as shown in FIG. 4, the foregoing step S50 includes:
S51、根据所述获取的系统元数据恢复MBR;S51. Restore the MBR according to the obtained system metadata.
根据所述获取的系统元数据中MBR信息,使用dd命令恢复MBR到当前待恢复系统。According to the MBR information in the acquired system metadata, the dd command is used to restore the MBR to the current system to be restored.
S52、在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;S52: When the image file is not obtained locally from the current system to be restored, calculate a disk partition ratio of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored;
所述辅助系统在解析到内核启动参数中包含boot_disk时,确定所述镜像文件是从当前待恢复系统的本地备份获取,也就是说所述镜像文件中的分区表信息及文件系统信息与当前待恢复系统中的信息完全一致,此时,所述数据恢复 程序会跳过恢复分区和文件系统的相关操作。When the auxiliary system includes boot_disk in the kernel boot parameter, it is determined that the image file is obtained from a local backup of the current system to be restored, that is, the partition table information and the file system information in the image file are currently waiting for The information in the recovery system is completely consistent. At this time, the data is recovered. The program skips operations related to restoring partitions and file systems.
在所述镜像文件不是从当前待恢复系统的本地获取时,获取所述系统元数据中的分区表信息,并根据所述分区表信息和当前待恢复系统的磁盘信息获得所要分区的个数、各个分区的类型和分区大小等信息。其中,所述获得的分区的个数与所述镜像文件的分区表信息中的分区个数相同;所述获得的各个分区的类型与所述镜像文件的分区表信息中各个分区的类型相同;所述获得的各个分区在待恢复服务器的磁盘中的大小比重与所述镜像文件的分区表信息中各个分区在备份服务器磁盘中的大小比重对应相同,例如,备份服务器的磁盘大小为100G,分区1为20G,恢复时的待恢复服务器的磁盘大小为200G,则恢复后的分区1为40G。Obtaining the partition table information in the system metadata when the image file is not obtained locally from the current system to be restored, and obtaining the number of the required partitions according to the partition table information and the disk information of the current system to be restored, Information such as the type and partition size of each partition. The number of the obtained partitions is the same as the number of partitions in the partition table information of the image file; the obtained types of the partitions are the same as the types of the partitions in the partition table information of the image file; The size of the obtained partitions in the disk of the server to be restored is the same as the size of each partition in the backup server disk in the partition table information of the image file, for example, the disk size of the backup server is 100G, and the partition is 1 is 20G, and the disk size of the server to be restored at recovery is 200G, and the restored partition 1 is 40G.
S53、根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区;S53. Partition the disk of the current system to be restored according to the disk partition ratio.
对当前待恢复系统的磁盘进行分区可使用fdisk工具。The fdisk tool can be used to partition the disk of the current system to be restored.
S54、在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。S54. After the disk partition is completed, recover the LVM and the file system according to the system metadata.
在恢复LVM时,根据所述系统元数据中的LVM信息,使用pvcreate命令重新创建pv,使用vgcreate命令重新创建vg,使用lvcreate命令重新创建lv。在恢复文件系统时,根据所述系统元数据中的文件系统信息,使用对应的文件系统格式化工具重新创建文件系统,并在格式化时指定文件系统的UUID和Label。When restoring LVM, use the pvcreate command to recreate pv based on the LVM information in the system metadata, recreate vg using the vgcreate command, and recreate lv using the lvcreate command. When the file system is restored, the file system is recreated using the corresponding file system formatting tool according to the file system information in the system metadata, and the UUID and Label of the file system are specified when formatting.
本发明实施例提出的基于Linux的数据处理方法,根据解压出的分区表信息中各个分区在备份服务器磁盘上的大小比重,对待恢复系统的服务器磁盘进行按比例分区,能够在待恢复服务器的磁盘大小比备份服务器的磁盘较小时,避免分区不够,或在待恢复服务器的磁盘大小比备份服务器的磁盘较大时,避免空间浪费。The Linux-based data processing method according to the embodiment of the present invention, according to the size proportion of each partition in the decompressed partition table information on the backup server disk, the server disk of the system to be restored is proportionally partitioned, and the disk of the server to be restored can be When the size of the backup server's disk is smaller, avoid the partition is not enough, or avoid the waste of space when the disk size of the server to be restored is larger than the disk size of the backup server.
基于第三或第四实施例提出本发明基于Linux的数据处理方法第五实施例,在本实施例中,如图5所示,上述步骤S70之后,所述基于Linux的数据处理方法还包括:The fifth embodiment of the data processing method of the present invention is based on the third or fourth embodiment. In this embodiment, as shown in FIG. 5, after the step S70, the Linux-based data processing method further includes:
S80、切换当前待恢复系统的根文件目录为所述第二目录;S80. Switch the root file directory of the current system to be restored to the second directory.
使用chroot命令切换当前待恢复系统的根文件目录为所述第二目录。Use the chroot command to switch the root file directory of the current system to be restored to the second directory.
S90、在boot分区未挂载时,挂载所述boot分区并解析initrd文件; S90. When the boot partition is not mounted, mount the boot partition and parse the initrd file.
在根文件目录切换完成后,检查boot分区是否已挂载。在检查到所述boot分区未挂载时,挂载所述boot分区,以获得所述boot分区中存放的initrd文件。After the root file directory switch is completed, check if the boot partition is mounted. When it is checked that the boot partition is not mounted, the boot partition is mounted to obtain an initrd file stored in the boot partition.
S100、获取当前待恢复系统已经加载的硬件驱动信息,并将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;S100: Obtain hardware driver information that has been loaded by the current system to be restored, and package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file.
所述预定文件是指从所述initrd文件中解析获得的基本命令文件、动态库文件、配置文件、驱动文件等。The predetermined file refers to a basic command file, a dynamic library file, a configuration file, a driver file, and the like obtained by parsing from the initrd file.
S110、将当前待恢复系统的initrd文件替换为新生成的initrd文件,并重启当前待恢复系统。S110: Replace the initrd file of the current system to be restored with the newly generated initrd file, and restart the current system to be restored.
本发明实施例提出的基于Linux的数据处理方法,在进行系统恢复时,能够动态的生成包含当前待恢复系统的硬件驱动信息的initrd文件,从而使在一台机器上备份生成的镜像文件,可用于恢复其它不同类型硬件的机器。The Linux-based data processing method provided by the embodiment of the present invention can dynamically generate an initrd file containing hardware driver information of the current system to be restored when the system is restored, so that the generated image file can be backed up on one machine. For restoring machines of other different types of hardware.
本发明实施例还提出一种基于Linux的数据处理装置,如图6所示,示出了本发明基于Linux的数据处理装置第一实施例的功能模块示意图,包括:The embodiment of the present invention further provides a data processing apparatus based on Linux. As shown in FIG. 6, a functional module diagram of a first embodiment of a data processing apparatus based on Linux according to the present invention is shown, including:
接收模块110,被配置为接收数据备份指令;The receiving module 110 is configured to receive a data backup instruction;
服务器在正常运行过程中,当用户通过命令行或界面操作等方式触发启动数据备份时,服务器的接收模块110将接收到触发数据备份的指令。During the normal operation of the server, when the user triggers the startup data backup through a command line or interface operation, the receiving module 110 of the server receives an instruction to trigger the data backup.
检测模块120,被配置为检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;The detecting module 120 is configured to detect whether the current system environment satisfies a condition for performing data backup while the system continues to operate;
服务器的接收模块110在接收到所述触发数据备份的指今后,检测模块120将检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件。检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件,即是检测当前系统是否有影响数据备份的情况发生。本实施例中,检测模块120可通过检测当前系统是否有其他进程正在进行内存数据读写或有硬盘错误的情况发生来判断当前系统是否满足在系统继续运行的同时进行数据备份的条件。在有任一所述情况发生时,服务器不启动数据备份程序,并给出相关提示消息;在没有任一所述情况发生时,服务器启动数据备份程序进行数据备份。After receiving the trigger data backup, the receiving module 110 of the server will detect whether the current system environment satisfies the condition for data backup while the system continues to run. Check whether the current system environment meets the conditions for data backup while the system continues to run, that is, whether the current system affects data backup occurs. In this embodiment, the detecting module 120 can determine whether the current system satisfies the condition for performing data backup while the system continues to run by detecting whether the current system is in the process of reading or writing memory data or having a hard disk error. When any of the above situations occur, the server does not start the data backup program and gives a related prompt message; when none of the above occurs, the server starts the data backup program to perform data backup.
备份模块130,被配置为在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。The backup module 130 is configured to package all the data to be backed up and generate an image file when the current system environment satisfies the condition of data backup while the system continues to run.
启动数据备份程序后,备份模块130在进行数据备份操作的同时,检测模 块120实时检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件,在检测到当前系统环境不满足在系统继续运行的同时进行数据备份的条件时,备份模块130暂停数据备份操作,并在检测到当前系统环境满足在系统继续运行的同时进行数据备份的条件时,备份模块130继续之前暂停的操作。After the data backup program is started, the backup module 130 detects the mode while performing the data backup operation. The block 120 detects in real time whether the current system environment satisfies the condition for data backup while the system continues to run. When detecting that the current system environment does not satisfy the condition for data backup while the system continues to run, the backup module 130 suspends the data backup operation. And when it is detected that the current system environment satisfies the condition of data backup while the system continues to run, the backup module 130 continues the previously suspended operation.
所述待备份数据可以为系统数据,也可以为系统数据和文件系统数据,根据用户的选择以确定。以系统数据和文件系统数据的备份为例,在Linux系统中,备份模块130进行参数解析,获取用户指定的备份目录和生成的镜像文件名称等参数信息;然后在扫描磁盘查找到boot分区后,使用dd命令备份启动磁盘的首个512字节到文件1,即备份MBR信息到所述文件1;使用fdisk工具备份系统分区表信息到文件2;获取系统的LVM相关信息(包括物理卷信息、卷组信息、逻辑卷信息),并将其中的逻辑卷信息备份到文件3;采集系统的文件系统信息(包括文件系统类型、Label、UUID),并将所采集的信息备份到文件4;读取/proc/mounts,获取系统的文件系统挂载信息,并根据所述文件系统挂载信息将所有磁盘的文件系统挂载到所述备份目录;之后,将所述备份目录进行打包并生成用户指定名称的镜像文件。其中,所述文件1-文件4均备份在所述备份目录中。The data to be backed up may be system data, or may be system data and file system data, and is determined according to a user's selection. Taking the backup of the system data and the file system data as an example, in the Linux system, the backup module 130 performs parameter parsing, obtains parameter information such as the backup directory specified by the user and the name of the generated image file; and then, after scanning the disk to find the boot partition, Use the dd command to back up the first 512 bytes of the boot disk to file 1, that is, back up the MBR information to the file 1; use the fdisk tool to back up the system partition table information to the file 2; obtain the LVM related information of the system (including the physical volume information, Volume group information, logical volume information), and back up the logical volume information to file 3; collect the file system information of the system (including file system type, Label, UUID), and back up the collected information to file 4; read Take /proc/mounts, obtain the file system mount information of the system, and mount the file system of all disks to the backup directory according to the file system mount information; after that, package the backup directory and generate a user An image file with the specified name. The files 1 to 4 are all backed up in the backup directory.
本发明实施例提出的基于Linux的数据处理装置,通过判断当前系统环境是否符合在系统运行的同时进行数据备份的条件,在当前系统环境符合所述条件时,实现在不重启系统的情况下备份所述系统中的待备份数据,突破了传统的需要重启系统才能备份数据的系统数据备份方式。The Linux-based data processing apparatus according to the embodiment of the present invention determines whether the current system environment meets the conditions for data backup while the system is running, and when the current system environment meets the conditions, the backup is performed without restarting the system. The data to be backed up in the system breaks through the traditional system data backup mode that needs to restart the system to back up data.
参照图7,基于第一实施例提出本发明基于Linux的数据处理装置第二实施例,基于上述图6所示的实施例,所述备份模块130包括:Referring to FIG. 7, a second embodiment of the Linux-based data processing apparatus of the present invention is proposed based on the first embodiment. Based on the embodiment shown in FIG. 6, the backup module 130 includes:
获取单元131,被配置为获取可跳过文件列表;The obtaining unit 131 is configured to obtain a skippable file list;
数据备份程序启动后,在用户选择待备份数据时,会根据提示选择在系统恢复时可跳过的系统文件,即可以不恢复的系统文件。在用户选择所述可跳过的系统文件后,服务器即可根据用户的选择获得可跳过文件列表。本实施例中,所述可跳过文件可以是IP配置文件、hostname配置文件等。After the data backup program is started, when the user selects the data to be backed up, it will select the system file that can be skipped when the system is restored according to the prompt, that is, the system file that can be recovered. After the user selects the skippable system file, the server can obtain a list of skippable files according to the user's selection. In this embodiment, the skippable file may be an IP configuration file, a hostname configuration file, or the like.
备份单元132,被配置为将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;The backup unit 132 is configured to store the skippable file list and all system metadata to be backed up to a preset first directory;
所述系统元数据包括MBR信息文件,分区表信息文件,LVM信息文件, 文件系统信息文件。所述预设的第一目录是由用户创建或指定的一个备份目录,用于将所有的待备份数据存储到所述第一目录下。The system metadata includes an MBR information file, a partition table information file, and an LVM information file. File system information file. The preset first directory is a backup directory created or designated by the user, and is used to store all the data to be backed up under the first directory.
所述获取单元131,还被配置为获取当前系统的文件系统挂载信息;The obtaining unit 131 is further configured to acquire file system mount information of the current system;
所述备份单元132,还被配置为根据所述挂载信息将相应文件系统挂载到所述第一目录;The backup unit 132 is further configured to mount the corresponding file system to the first directory according to the mounting information;
打包单元133,被配置为将待备份文件打包到所述第一目录并生成预设名称的镜像文件。The packaging unit 133 is configured to package the file to be backed up into the first directory and generate an image file of a preset name.
本发明实施例提出的基于Linux的数据处理装置,能够在数据备份时由用户指定在数据恢复时可跳过的系统文件,为系统批量安装或恢复时实现不同服务器具有不同系统配置做前期支持。The Linux-based data processing apparatus provided by the embodiment of the present invention can specify a system file that can be skipped during data recovery when the data is backed up, and provides preliminary support for different systems having different system configurations when the system is installed or restored in batches.
参照图8,基于第二实施例提出本发明基于Linux的数据处理装置第三实施例,基于上述图6所示的实施例,所述基于Linux的数据处理装置还包括:Referring to FIG. 8, a third embodiment of the Linux-based data processing apparatus of the present invention is proposed based on the second embodiment. Based on the embodiment shown in FIG. 6, the Linux-based data processing apparatus further includes:
所述接收模块110,还被配置为接收数据恢复指令;The receiving module 110 is further configured to receive a data recovery instruction;
用户使用镜像文件安装或恢复系统时,进入数据备份及恢复的辅助系统。所述辅助系统由内核、命令集、动态库、驱动模块、备份与恢复模块、启动支持模块、构建模块、根文件系统等构成。其中,内核是所述辅助系统的核心,能够实现基本的操作系统功能,并向上提供服务原语;命令集采用动态编译;所述命令集中的命令在执行时需要动态库的支持;驱动模块能够保证所述辅助系统对不同硬件环境的支持,以实现不同硬件配置下的启动过程的一致性;备份与恢复模块能够根据用户的选择启动数据备份程序或数据恢复程序;启动支持模块与内核配合完成系统上电启动的过程;构建模块是对数据备份及恢复过程的构建方式的描述;根文件系统主要提供proc文件系统、devpts文件系统和.sysfs文件系统等的挂载目录,基本命令集和动态库所在的目录,内核模块和硬件驱动集所在的目录,辅助系统在启动时所需的特定配置所在的目录等。本实施例中,内核采用Linux2.6.32版本,并以此为基础构建了vmlinuz内核镜像,以及当前主流的硬件驱动集文件。When the user installs or restores the system using the image file, it enters the auxiliary system for data backup and recovery. The auxiliary system is composed of a kernel, a command set, a dynamic library, a driver module, a backup and recovery module, a boot support module, a build module, a root file system, and the like. The kernel is the core of the auxiliary system, which can implement basic operating system functions and provide service primitives upwards; the command set adopts dynamic compilation; the command in the command set needs dynamic library support during execution; the driver module can Ensure that the auxiliary system supports different hardware environments to achieve consistency of the boot process under different hardware configurations; the backup and recovery module can start a data backup program or a data recovery program according to the user's selection; the startup support module cooperates with the kernel to complete The process of powering on the system; the building module is a description of the way the data backup and recovery process is built; the root file system mainly provides the mount directory of the proc file system, the devpts file system, and the .sysfs file system, basic command sets and dynamics. The directory where the library is located, the directory where the kernel modules and hardware driver sets are located, the directory where the specific configuration required for the secondary system is started, and so on. In this embodiment, the kernel adopts the Linux 2.6.3 version, and based on this, the vmlinuz kernel image and the current mainstream hardware driver set files are built.
所述辅助系统的启动方式有多种,如U盘启动、光盘启动、磁盘启动、网络启动等。在不同的启动方式下均可进入相同的辅助系统。在所述辅助系统的启动方式为网络启动时,客户机通过支持PXE的网卡向网络中发送请求DHCP 的广播,DHCP服务器在接收到所述请求后,给客户机提供IP地址等信息,然后客户机根据所述IP地址信息请求下载所述辅助系统的内核映像文件并在下载完成后启动加载所述辅助系统。There are various startup modes of the auxiliary system, such as U disk boot, CD boot, disk boot, network boot, and the like. The same auxiliary system can be accessed in different startup modes. When the startup mode of the auxiliary system is network startup, the client sends a request DHCP to the network through a network card supporting PXE. Broadcasting, after receiving the request, the DHCP server provides the client with information such as an IP address, and then the client requests to download the kernel image file of the auxiliary system according to the IP address information and initiate loading after the download is completed. auxiliary system.
所述辅助系统启动后会加载运行文件和具有系统恢复功能的进程,检查并解析运行参数。所述运行参数包括所述辅助系统的启动方式及在所述启动方式下镜像文件的存放路径。在待恢复服务器上启动所述辅助系统时,根据不同启动方式对应的bootloader加载所述辅助系统的vmlinuz内核,并通过所述vmlinuz内核解压所述辅助系统的initrd文件;扫描所述待恢复服务器的硬件,触发udev事件,根据udev事件加载所述待恢复服务器的硬件相应的硬件驱动。所述辅助系统启动完成后,由用户选择启动数据恢复程序,此时,接收模块110将接收到数据恢复指令。After the auxiliary system is started, the running file and the system with the system recovery function are loaded, and the running parameters are checked and parsed. The operating parameter includes a startup mode of the auxiliary system and a storage path of the image file in the startup mode. When the auxiliary system is started on the server to be restored, the vmlinuz kernel of the auxiliary system is loaded according to a bootloader corresponding to different startup modes, and the initrd file of the auxiliary system is decompressed by the vmlinuz kernel; and the server to be restored is scanned. The hardware triggers the udev event, and loads the hardware driver corresponding to the hardware of the server to be restored according to the udev event. After the startup of the auxiliary system is completed, the user selects to start the data recovery program. At this time, the receiving module 110 will receive the data recovery instruction.
获取模块140,被配置为根据所述数据恢复指令获取镜像文件;The obtaining module 140 is configured to acquire an image file according to the data recovery instruction;
所述待恢复服务器的接收模块110在接收到数据恢复指令后,获取模块140获取所述辅助系统的系统启动参数,根据解析得到的所述辅助系统的启动方式和在所述启动方式下镜像文件的存放路径,从所述存放路径获取镜像文件。After receiving the data recovery instruction, the acquiring module 110 of the to-be-recovered server acquires the system startup parameter of the auxiliary system, and according to the initialization mode of the auxiliary system obtained by the parsing and the image file in the startup mode. The storage path from which the image file is obtained.
获取镜像文件的方式可以为本地磁盘获取、U盘获取、光盘获取、网络服务器获取。所述网络服务器提供网络相关服务,如DHCP服务、UDP服务、FTP服务、NFS服务等。在解析出的所述辅助系统的启动方式为磁盘启动时,获取模块140根据解析出的镜像文件在本地磁盘的存放路径,挂载本地磁盘的文件系统到预设的第二目录,并从所述第二目录中获取镜像文件;在解析出的所述辅助系统的启动方式为U盘启动时,获取模块140根据解析出的镜像文件在所述U盘上的存放路径,挂载所述U盘到所述第二目录,并从所述第二目录获取镜像文件;在解析出的所述辅助系统的启动方式为光盘启动时,获取模块140根据解析出的镜像文件在所述光盘上的存放路径,挂载所述光盘到所述第二目录,并从所述第二目录获取镜像文件;在解析出的所述辅助系统的启动方式为网络启动时,获取模块140根据解析出的镜像文件在UDP服务器上的存放路径,使用udpcast传输文件(输入参数包括镜像文件在UDP服务器的存放路径);在解析出的所述辅助系统的启动方式为网络启动时,获取模块140根据解析出的镜像文件在FTP服务器上的存放路径,使用wget传输文件(输入参数包括镜像文件在FTP服务器的存放路径);在解析出的所述辅助系统的启动方式为网络启 动时,获取模块140根据解析出的镜像文件在NFS服务器上的存放路径,挂载NFS到所述第二目录,并从所述第二目录中获取镜像文件。The method of obtaining an image file can be obtained by local disk, U disk acquisition, CD acquisition, and network server acquisition. The network server provides network related services, such as a DHCP service, a UDP service, an FTP service, an NFS service, and the like. When the startup mode of the auxiliary system is the disk startup, the obtaining module 140 mounts the file system of the local disk to the preset second directory according to the path of the parsed image file on the local disk, and Obtaining an image file in the second directory; when the boot mode of the auxiliary system is the booting of the USB disk, the obtaining module 140 mounts the U according to the storage path of the parsed image file on the USB disk. Disk to the second directory, and obtaining an image file from the second directory; when the parsing mode of the auxiliary system is the booting of the CD, the obtaining module 140 is configured on the optical disk according to the parsed image file. The storage path is configured to mount the optical disc to the second directory, and obtain an image file from the second directory; when the parsed startup mode of the auxiliary system is network startup, the obtaining module 140 is configured according to the parsed image. File storage path on the UDP server, using udpcast to transfer files (input parameters include the storage path of the image file on the UDP server); in the parsing of the auxiliary system When the network mode is started, the obtaining module 140 uses the wget to transfer the file according to the storage path of the parsed image file on the FTP server (the input parameter includes the storage path of the image file on the FTP server); and the auxiliary system is parsed The startup method is network startup The acquiring module 140 mounts the NFS to the second directory according to the storage path of the parsed image file on the NFS server, and obtains the image file from the second directory.
处理模块150,被配置为解压所述镜像文件,从而获得系统元数据、文件系统挂载信息、可跳过文件列表和待恢复文件;The processing module 150 is configured to decompress the image file, thereby obtaining system metadata, file system mount information, a skippable file list, and a file to be restored;
所述获取模块140,还被配置为获取解压出的所述系统元数据;The obtaining module 140 is further configured to obtain the decompressed system metadata;
恢复模块160,被配置为恢复所述系统元数据到当前待恢复系统;The recovery module 160 is configured to restore the system metadata to the current system to be restored;
所述获取模块140,还被配置为获取解压出的所述文件系统挂载信息;The obtaining module 140 is further configured to obtain the decompressed file system mount information.
所述恢复模块160,还被配置为根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;The recovery module 160 is further configured to mount the related file system to the preset second directory according to the file system mounting information;
所述预设的第二目录是由所述数据恢复程序创建并指定的一个用于存放所述镜像文件解压出的数据的目录。The preset second directory is a directory created and specified by the data recovery program for storing data decompressed by the image file.
所述获取模块140,还被配置为获取解压出的所述可跳过文件列表;The obtaining module 140 is further configured to obtain the decompressed list of the skippable files;
所述恢复模块160,还被配置为根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。The recovery module 160 is further configured to restore the decompressed files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
在解压所述镜像文件时,恢复模块160根据所述可跳过文件列表依次判断解压出的文件是否是可跳过文件;在解压出的文件是可跳过文件时,恢复模块160跳过对所述文件的恢复操作,继续判断下一个文件是否是可跳过文件;在解压出的文件不是可跳过文件时,恢复模块160将所述文件恢复到所述第二目录,然后继续判断下一个文件是否是可跳过文件。When decompressing the image file, the recovery module 160 sequentially determines, according to the skippable file list, whether the decompressed file is a skippable file; when the decompressed file is a skippable file, the recovery module 160 skips the pair The recovery operation of the file continues to determine whether the next file is a skippable file; when the extracted file is not a skippable file, the recovery module 160 restores the file to the second directory, and then continues to judge Whether a file is a skippable file.
本发明实施例提出的基于Linux的数据处理装置,所采用的镜像文件是基于上述第二实施例中生成的所述镜像文件,在恢复所述镜像文件到待恢复服务器时,根据所述镜像文件中解压出的可跳过文件列表有选择性地恢复数据,能够不覆盖用户指定的系统配置文件,从而在系统批量安装或恢复时使不同服务器具有不同配置。The image processing apparatus of the embodiment of the present invention is based on the image file generated in the second embodiment, and the image file is restored according to the image file when the image file is restored to the server to be restored. The decompressed list of skippable files selectively recovers data, and can override the user-specified system configuration file, so that different servers have different configurations when the system is installed or restored in batches.
参照图9,基于第三实施例提出本发明基于Linux的数据处理装置第四实施例,基于上述图8所示的实施例,所述恢复模块160包括:Referring to FIG. 9, a fourth embodiment of the Linux-based data processing apparatus of the present invention is proposed based on the third embodiment. Based on the embodiment shown in FIG. 8, the recovery module 160 includes:
恢复单元161,被配置为根据所述获取的系统元数据恢复MBR;The recovery unit 161 is configured to restore the MBR according to the acquired system metadata;
根据所述获得的系统元数据中MBR信息,恢复单元161使用dd命令恢复 MBR到当前待恢复系统。Based on the MBR information in the obtained system metadata, the recovery unit 161 recovers using the dd command. MBR to the current system to be restored.
计算单元162,被配置为在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;The calculating unit 162 is configured to calculate a disk of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored when the image file is not acquired locally from the current system to be restored. Partition ratio
所述辅助系统在解析到内核启动参数中包含boot_disk时,确定所述镜像文件是从当前待恢复系统的本地备份获取,也就是说所述镜像文件中的分区表信息及文件系统信息与当前待恢复系统中的信息完全一致,此时,所述数据恢复程序会跳过恢复分区和文件系统的相关操作。When the auxiliary system includes boot_disk in the kernel boot parameter, it is determined that the image file is obtained from a local backup of the current system to be restored, that is, the partition table information and the file system information in the image file are currently waiting for The information in the recovery system is completely consistent. At this time, the data recovery program skips the operations related to the recovery partition and the file system.
在所述镜像文件不是从当前待恢复系统的本地获取时,计算单元162获取所述系统元数据中的分区表信息,并根据所述分区表信息和当前待恢复系统的磁盘信息获得所要分区的个数、各个分区的类型和分区大小等信息。其中,所述获得的分区的个数与所述镜像文件的分区表信息中的分区个数相同;所述获得的各个分区的类型与所述镜像文件的分区表信息中各个分区的类型相同;所述获得的各个分区在待恢复服务器的磁盘中的大小比重与所述镜像文件的分区表信息中各个分区在备份服务器磁盘中的大小比重对应相同,例如,备份服务器的磁盘大小为100G,分区1为20G,恢复时的待恢复服务器的磁盘大小为200G,则恢复后的分区1为40G。When the image file is not obtained locally from the current system to be restored, the calculating unit 162 acquires the partition table information in the system metadata, and obtains the desired partition according to the partition table information and the disk information of the current system to be restored. Information such as the number, type of each partition, and partition size. The number of the obtained partitions is the same as the number of partitions in the partition table information of the image file; the obtained types of the partitions are the same as the types of the partitions in the partition table information of the image file; The size of the obtained partitions in the disk of the server to be restored is the same as the size of each partition in the backup server disk in the partition table information of the image file, for example, the disk size of the backup server is 100G, and the partition is 1 is 20G, and the disk size of the server to be restored at recovery is 200G, and the restored partition 1 is 40G.
分区单元163,被配置为根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区;The partitioning unit 163 is configured to partition the disk of the current system to be restored according to the disk partition ratio;
分区单元163可使用fdisk工具对当前待恢复系统的磁盘进行分区。The partition unit 163 can use the fdisk tool to partition the disk of the current system to be restored.
所述恢复单元161,还被配置为在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。The recovery unit 161 is further configured to restore the LVM and the file system according to the system metadata after the disk partition is completed.
在恢复LVM时,恢复单元161根据所述系统元数据中的LVM信息,使用pvcreate命令重新创建pv,使用vgcreate命令重新创建vg,使用lvcreate命令重新创建lv。在恢复文件系统时,恢复单元161根据所述系统元数据中的文件系统信息,使用对应的文件系统格式化工具重新创建文件系统,并在格式化时指定文件系统的UUID和Label。When recovering the LVM, the recovery unit 161 recreates the pv using the pvcreate command according to the LVM information in the system metadata, recreates the vg using the vgcreate command, and recreates the lv using the lvcreate command. When restoring the file system, the recovery unit 161 recreates the file system using the corresponding file system formatting tool according to the file system information in the system metadata, and specifies the UUID and Label of the file system when formatting.
本发明实施例提出的基于Linux的数据处理装置,根据解压出的分区表信息中各个分区在备份服务器磁盘上的大小比重,对待恢复系统的服务器磁盘进行 按比例分区,能够在待恢复服务器的磁盘大小比备份服务器的磁盘较小时,避免分区不够,或在待恢复服务器的磁盘大小比备份服务器的磁盘较大时,避免空间浪费。The Linux-based data processing apparatus according to the embodiment of the present invention performs the server disk of the system to be restored according to the size proportion of each partition in the decompressed partition table information on the backup server disk. Proportional partitioning avoids space shortage when the disk size of the server to be restored is smaller than that of the backup server, or when the disk size of the server to be restored is larger than that of the backup server.
参照图10,基于第三或第四实施例提出本发明基于Linux的数据处理装置第五实施例,基于上述图8所示的实施例,所述基于Linux的数据处理装置还包括:Referring to FIG. 10, a fifth embodiment of the Linux-based data processing apparatus of the present invention is proposed based on the third or fourth embodiment. Based on the embodiment shown in FIG. 8, the Linux-based data processing apparatus further includes:
所述处理模块150,还被配置为切换当前待恢复系统的根文件目录为所述第二目录;The processing module 150 is further configured to switch the root file directory of the current system to be restored to the second directory;
处理模块150可使用chroot命令切换当前待恢复系统的根文件目录为所述第二目录。The processing module 150 can use the chroot command to switch the root file directory of the current system to be restored to the second directory.
initrd制作模块170,被配置为在boot分区未挂载时,挂载所述boot分区并解析initrd文件;The initrd production module 170 is configured to mount the boot partition and parse the initrd file when the boot partition is not mounted;
在根文件目录切换完成后,initrd制作模块170检查boot分区是否已挂载。在检查到所述boot分区未挂载时,initrd制作模块170挂载所述boot分区,以获得所述boot分区中存放的initrd文件。After the root file directory switch is completed, the initrd creation module 170 checks if the boot partition is mounted. When it is checked that the boot partition is not mounted, the initrd making module 170 mounts the boot partition to obtain an initrd file stored in the boot partition.
所述获取模块140,还被配置为获取当前待恢复系统已经加载的硬件驱动信息;The obtaining module 140 is further configured to acquire hardware driver information that has been loaded by the current system to be restored;
所述initrd制作模块170,还被配置为将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;The initrd making module 170 is further configured to package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
所述预定文件是指从所述initrd文件中解析获得的基本命令文件、动态库文件、配置文件、驱动文件等。The predetermined file refers to a basic command file, a dynamic library file, a configuration file, a driver file, and the like obtained by parsing from the initrd file.
所述处理模块150,还被配置为将当前待恢复系统的initrd文件替换为新生成的initrd文件;The processing module 150 is further configured to replace the initrd file of the current system to be restored with the newly generated initrd file;
重启模块180,被配置为重启当前待恢复系统。The restart module 180 is configured to restart the current system to be restored.
本发明实施例提出的基于Linux的数据处理装置,在进行系统恢复时,能够动态的生成包含当前待恢复系统的硬件驱动信息的initrd文件,从而使在一台机器上备份生成的镜像文件,可用于恢复其它不同类型硬件的机器。The Linux-based data processing apparatus provided by the embodiment of the present invention can dynamically generate an initrd file containing the hardware driver information of the current system to be restored when the system is restored, so that the generated image file can be backed up on one machine. For restoring machines of other different types of hardware.
本发明实施例还提出一种基于Linux的数据处理系统,如图11所示,示出 了本发明基于Linux的数据处理系统第一实施例的结构示意图,包括镜像文件存储介质100、备份及恢复服务器200,其特征在于,所述备份及恢复服务器200包括上述任一实施例所述的基于Linux的数据处理装置;所述备份及恢复服务器200上的所述基于Linux的数据处理装置被配置为将所述备份及恢复服务器200上的数据备份为镜像文件,并将所述镜像文件存储在本地或所述镜像文件存储介质100上,在需要恢复数据时将所述镜像文件经过解压后恢复其数据到所述备份及恢复服务器200。The embodiment of the present invention further provides a Linux-based data processing system, as shown in FIG. A schematic diagram of a structure of a first embodiment of a Linux-based data processing system, including an image file storage medium 100 and a backup and recovery server 200, wherein the backup and recovery server 200 includes any of the above embodiments. a Linux-based data processing apparatus; the Linux-based data processing apparatus on the backup and recovery server 200 is configured to back up data on the backup and recovery server 200 as an image file and store the image file On the local or the image file storage medium 100, the image file is decompressed and the data is restored to the backup and recovery server 200 when the data needs to be restored.
所述备份及恢复服务器200可以是既被配置为备份数据又被配置为恢复所述备份数据到本地的一个服务器,也可以是包含一个备份服务器和一个或多个恢复服务器的服务器机群。所述镜像文件存储介质100可以是U盘、光盘、网络服务器等。The backup and recovery server 200 may be a server configured to back up data and configured to restore the backup data to a local server, or a server cluster including a backup server and one or more recovery servers. The image file storage medium 100 may be a USB flash drive, an optical disk, a web server, or the like.
本发明实施例提出的基于Linux的数据处理系统,支持在不重启系统的情况下备份待备份数据,可以有选择性地处理系统配置数据,并且考虑到同一备份系统所生成的镜像文件要用于不同硬件机器的应用情况,在磁盘大小、硬件驱动等差异方面进行了兼容性适配,便于用户进行一键恢复、批量部署系统,大大地提高了工程应用的灵活性。The Linux-based data processing system proposed by the embodiment of the present invention supports backing up data to be backed up without restarting the system, and can selectively process system configuration data, and considers that the image file generated by the same backup system is to be used. The application of different hardware machines has been compatible with the differences in disk size and hardware drivers, which is convenient for users to perform one-click recovery and batch deployment systems, greatly improving the flexibility of engineering applications.
基于第一实施例提出本发明基于Linux的数据处理系统第二实施例,在本实施例中,所述镜像文件存储介质包括U盘、光盘、网络服务器,所述基于Linux的数据处理装置除支持本地存储镜像文件进行备份或恢复的方式外,还同时支持任一所述镜像文件存储介质存储所述镜像文件进行备份或恢复的方式。A second embodiment of the Linux-based data processing system of the present invention is provided based on the first embodiment. In this embodiment, the image file storage medium includes a USB flash drive, an optical disk, and a network server, and the Linux-based data processing device supports In addition to the manner in which the image file is stored or backed up, the mirror file storage medium is also supported to store the image file for backup or recovery.
本发明实施例提出的基于Linux的数据处理系统,同时支持多种镜像文件存储方式的数据恢复,在需要恢复数据时,可根据实际需求灵活采用合适的的恢复方式。The Linux-based data processing system proposed by the embodiment of the present invention supports data recovery of multiple image file storage modes at the same time. When data needs to be restored, an appropriate recovery mode can be flexibly adopted according to actual needs.
以上仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.
工业实用性Industrial applicability
本申请公开的基于Linux的数据处理方法包括:在接收到数据备份指令后, 检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。本申请还公开一种基于Linux的数据处理装置和系统。本申请实现了在Linux系统继续运行的同时进行数据备份。 The Linux-based data processing method disclosed in the present application includes: after receiving a data backup instruction, Check whether the current system environment meets the conditions for data backup while the system continues to run; when the current system environment satisfies the conditions for data backup while the system continues to run, all the data to be backed up is packaged and an image file is generated. The present application also discloses a Linux-based data processing apparatus and system. This application implements data backup while the Linux system continues to run.

Claims (12)

  1. 一种基于Linux的数据处理方法,包括:A Linux-based data processing method, including:
    在接收到数据备份指令后,检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;After receiving the data backup instruction, detecting whether the current system environment satisfies the condition for performing data backup while the system continues to run;
    在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。When the current system environment satisfies the conditions for data backup while the system continues to run, all the data to be backed up is packaged and an image file is generated.
  2. 如权利要求1所述的方法,其中,所述在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件包括:The method of claim 1, wherein when the current system environment satisfies the condition for data backup while the system continues to run, packaging all the data to be backed up and generating the image file includes:
    获取可跳过文件列表,并将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;Obtaining a skippable file list, and storing the skippable file list and all system metadata to be backed up in a preset first directory;
    获取当前系统的文件系统挂载信息,并根据所述挂载信息将相应文件系统挂载到所述第一目录;Obtaining file system mount information of the current system, and mounting the corresponding file system to the first directory according to the mount information;
    将待备份文件打包到所述第一目录并生成预设名称的镜像文件。The file to be backed up is packaged into the first directory and an image file of a preset name is generated.
  3. 如权利要求2所述的方法,其中,所述基于Linux的数据处理方法还包括:The method of claim 2, wherein the Linux-based data processing method further comprises:
    在接收到数据恢复指令后,根据所述数据恢复指令获取镜像文件;After receiving the data recovery instruction, acquiring an image file according to the data recovery instruction;
    解压所述镜像文件,从而获得系统元数据、文件系统挂载信息、可跳过文件列表和待恢复文件;Decompressing the image file to obtain system metadata, file system mount information, a skippable file list, and a file to be restored;
    获取解压出的所述系统元数据,并恢复所述系统元数据到当前待恢复系统;Obtaining the decompressed system metadata, and restoring the system metadata to a current system to be restored;
    获取解压出的所述文件系统挂载信息,并根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;Obtaining the extracted file system mount information, and mounting the related file system to a preset second directory according to the file system mount information;
    获取解压出的所述可跳过文件列表,并根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。Obtaining the extracted list of skippable files, and restoring the unrecovered files that are not extracted in the skippable file list to the second directory according to the skippable file list.
  4. 如权利要求3所述的方法,其中,所述获取解压出的所述系统元数据,并恢复所述系统元数据到当前待恢复系统包括:The method of claim 3, wherein the obtaining the decompressed system metadata and restoring the system metadata to the current system to be restored comprises:
    根据所述获取的系统元数据恢复MBR;Recovering the MBR according to the acquired system metadata;
    在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;When the image file is not obtained locally from the current system to be restored, the disk partition ratio of the current system to be restored is calculated according to the partition table information in the system metadata and the disk information of the current system to be restored;
    根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区; According to the disk partition ratio, the disk of the current system to be restored is partitioned;
    在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。After the disk partition is completed, the LVM and file system are restored according to the system metadata.
  5. 如权利要求3或4所述的方法,其中,所述获取解压出的所述可跳过文件列表,并根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录的步骤之后,所述基于Linux的数据处理方法还包括:The method of claim 3 or 4, wherein the obtaining the decompressed list of skippable files and decompressing according to the list of skippable files is not in the list of skippable files After the step of restoring the restored file to the second directory, the Linux-based data processing method further includes:
    切换当前待恢复系统的根文件目录为所述第二目录;Switching the root file directory of the current system to be restored to the second directory;
    在boot分区未挂载时,挂载所述boot分区并解析initrd文件;When the boot partition is not mounted, mount the boot partition and parse the initrd file;
    获取当前待恢复系统已经加载的硬件驱动信息,并将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;Obtaining hardware driver information that has been loaded by the current system to be restored, and packaging the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
    将当前待恢复系统的initrd文件替换为新生成的initrd文件,并重启当前待恢复系统。Replace the initrd file of the current system to be restored with the newly generated initrd file, and restart the current system to be restored.
  6. 一种基于Linux的数据处理装置,包括:A Linux-based data processing device comprising:
    接收模块,被配置为接收数据备份指令;a receiving module configured to receive a data backup instruction;
    检测模块,被配置为检测当前系统环境是否满足在系统继续运行的同时进行数据备份的条件;a detection module configured to detect whether a current system environment satisfies a condition for performing data backup while the system continues to operate;
    备份模块,被配置为在当前系统环境满足在系统继续运行的同时进行数据备份的条件时,打包所有的待备份数据并生成镜像文件。The backup module is configured to package all the data to be backed up and generate an image file when the current system environment satisfies the conditions for data backup while the system continues to run.
  7. 如权利要求6所述的装置,其中,所述备份模块包括:The apparatus of claim 6 wherein said backup module comprises:
    获取单元,被配置为获取可跳过文件列表;An obtaining unit configured to obtain a list of skippable files;
    备份单元,被配置为将所述可跳过文件列表及所有待备份的系统元数据存储到预设的第一目录下;a backup unit configured to store the skippable file list and all system metadata to be backed up to a preset first directory;
    所述获取单元,还被配置为获取当前系统的文件系统挂载信息;The obtaining unit is further configured to acquire file system mounting information of the current system;
    所述备份单元,还被配置为根据所述挂载信息将相应文件系统挂载到所述第一目录;The backup unit is further configured to mount the corresponding file system to the first directory according to the mounting information;
    打包单元,被配置为将待备份文件打包到所述第一目录并生成预设名称的镜像文件。The packaging unit is configured to package the file to be backed up into the first directory and generate an image file of a preset name.
  8. 如权利要求7所述的装置,其中,所述基于Linux的数据处理装置还包括:The apparatus of claim 7, wherein the Linux-based data processing apparatus further comprises:
    所述接收模块,还被配置为接收数据恢复指令;The receiving module is further configured to receive a data recovery instruction;
    获取模块,被配置为根据所述数据恢复指令获取镜像文件;An obtaining module configured to acquire an image file according to the data recovery instruction;
    处理模块,被配置为解压所述镜像文件,从而获得系统元数据、文件系统 挂载信息、可跳过文件列表和待恢复文件;a processing module configured to decompress the image file to obtain system metadata and a file system Mount information, skippable file list, and files to be restored;
    所述获取模块,还被配置为获取解压出的所述系统元数据;The obtaining module is further configured to obtain the decompressed system metadata;
    恢复模块,被配置为恢复所述系统元数据到当前待恢复系统;a recovery module configured to restore the system metadata to a current system to be restored;
    所述获取模块,还被配置为获取解压出的所述文件系统挂载信息;The obtaining module is further configured to obtain the decompressed file system mounting information;
    所述恢复模块,还被配置为根据所述文件系统挂载信息将相关文件系统挂载到预设的第二目录;The recovery module is further configured to mount the related file system to a preset second directory according to the file system mounting information;
    所述获取模块,还被配置为获取解压出的所述可跳过文件列表;The obtaining module is further configured to obtain the decompressed list of the skippable files;
    所述恢复模块,还被配置为根据所述可跳过文件列表将解压出的不在所述可跳过文件列表中的待恢复文件恢复到所述第二目录。The recovery module is further configured to restore the extracted files to be recovered that are not in the skippable file list to the second directory according to the skippable file list.
  9. 如权利要求8所述的装置,其中,所述恢复模块包括:The apparatus of claim 8 wherein said recovery module comprises:
    恢复单元,被配置为根据所述获取的系统元数据恢复MBR;a recovery unit configured to recover the MBR according to the acquired system metadata;
    计算单元,被配置为在所述镜像文件不是从当前待恢复系统的本地获取时,根据所述系统元数据中的分区表信息和当前待恢复系统的磁盘信息,计算当前待恢复系统的磁盘分区比例;The calculating unit is configured to calculate a disk partition of the current system to be restored according to the partition table information in the system metadata and the disk information of the current system to be restored when the image file is not obtained locally from the current system to be restored. proportion;
    分区单元,被配置为根据所述磁盘分区比例,对当前待恢复系统的磁盘进行分区;a partition unit configured to partition a disk of the current system to be restored according to the disk partition ratio;
    所述恢复单元,还被配置为在磁盘分区完成后,根据所述系统元数据恢复LVM和文件系统。The recovery unit is further configured to restore the LVM and the file system according to the system metadata after the disk partition is completed.
  10. 如权利要求8或9所述的装置,其中,所述基于Linux的数据处理装置还包括:The apparatus of claim 8 or 9, wherein the Linux-based data processing apparatus further comprises:
    所述处理模块,还被配置为切换当前待恢复系统的根文件目录为所述第二目录;The processing module is further configured to switch the root file directory of the current system to be restored to the second directory;
    initrd制作模块,被配置为在boot分区未挂载时,挂载所述boot分区并解析initrd文件;The initrd production module is configured to mount the boot partition and parse the initrd file when the boot partition is not mounted;
    所述获取模块,还被配置为获取当前待恢复系统已经加载的硬件驱动信息;The obtaining module is further configured to acquire hardware driver information that has been loaded by the current system to be restored;
    所述initrd制作模块,还被配置为将所述硬件驱动信息和解析出的所述initrd文件中的预定文件打包生成新的initrd文件;The initrd production module is further configured to package the hardware driver information and the parsed predetermined file in the initrd file to generate a new initrd file;
    所述处理模块,还被配置为将当前待恢复系统的initrd文件替换为新生成的initrd文件;The processing module is further configured to replace the initrd file of the current system to be restored with the newly generated initrd file;
    重启模块,被配置为重启当前待恢复系统。The module is restarted and configured to restart the current system to be restored.
  11. 一种基于Linux的数据处理系统,包括镜像文件存储介质、备份及恢复 服务器;所述备份及恢复服务器包括如权利要求6-10任一项所述的基于Linux的数据处理装置;所述备份及恢复服务器上的所述基于Linux的数据处理装置被配置为将所述备份及恢复服务器上的数据备份为镜像文件,并将所述镜像文件存储在本地或所述镜像文件存储介质上,在需要恢复数据时将所述镜像文件经过解压后恢复其数据到所述备份及恢复服务器。A Linux-based data processing system that includes image file storage media, backup and recovery a server; the backup and recovery server comprising the Linux-based data processing device of any of claims 6-10; the Linux-based data processing device on the backup and recovery server configured to The data on the backup and recovery server is backed up as an image file, and the image file is stored locally or on the image file storage medium, and the image file is decompressed and the data is restored to the backup when the data needs to be restored. And restore the server.
  12. 如权利要求11所述的系统,其中,所述镜像文件存储介质包括U盘、光盘、网络服务器;所述基于Linux的数据处理装置被配置为除支持本地存储镜像文件进行备份或恢复的方式外,还同时支持任一所述镜像文件存储介质存储所述镜像文件进行备份或恢复的方式。 The system of claim 11, wherein the image file storage medium comprises a USB flash drive, an optical disk, a web server; the Linux-based data processing device is configured to support a local storage image file for backup or recovery. At the same time, it also supports the manner in which any of the image file storage media stores the image file for backup or recovery.
PCT/CN2016/073068 2015-09-25 2016-02-01 Method, device and system for data processing based on linux WO2017049828A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510624473.3A CN106557384B (en) 2015-09-25 2015-09-25 Data processing method, device and system based on Linux
CN201510624473.3 2015-09-25

Publications (1)

Publication Number Publication Date
WO2017049828A1 true WO2017049828A1 (en) 2017-03-30

Family

ID=58385813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/073068 WO2017049828A1 (en) 2015-09-25 2016-02-01 Method, device and system for data processing based on linux

Country Status (2)

Country Link
CN (1) CN106557384B (en)
WO (1) WO2017049828A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857345A (en) * 2019-01-31 2019-06-07 合肥谐桐科技有限公司 Realize the system and method based on concurrent disk carry interface management and running
CN110209525A (en) * 2018-04-24 2019-09-06 腾讯科技(深圳)有限公司 Operating system reduction method and device
CN110457083A (en) * 2019-07-04 2019-11-15 深圳市中易通安全芯科技有限公司 A kind of starting method and device of chip file system
CN110727545A (en) * 2018-07-17 2020-01-24 中标软件有限公司 Power failure protection method based on combined file system
CN110780930A (en) * 2019-09-23 2020-02-11 广州视源电子科技股份有限公司 Method and device for starting Android system, electronic equipment and storage medium
CN111198744A (en) * 2018-11-16 2020-05-26 中标软件有限公司 Method for automatic application program containerization and mirror image backup release
CN112948170A (en) * 2019-12-10 2021-06-11 中标软件有限公司 Method for realizing system power-down protection by using snapshot function of equipment mapping
CN114265628A (en) * 2021-12-22 2022-04-01 曙光信息产业股份有限公司 Deployment method, device, electronic equipment, storage medium and system of operating system
CN114924914A (en) * 2022-05-31 2022-08-19 广州鼎甲计算机科技有限公司 Disk partition table information backup and recovery method and system
CN116166472A (en) * 2023-03-01 2023-05-26 上海威固信息技术股份有限公司 Data recovery method and system for stored data
CN116932465A (en) * 2023-09-15 2023-10-24 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Mirror image file management method, system, equipment and medium
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107402849B (en) * 2017-07-31 2020-11-27 苏州浪潮智能科技有限公司 Backup and recovery method based on K-UX system
CN107423166B (en) * 2017-08-09 2020-03-20 郑州云海信息技术有限公司 Data processing method and system based on overlay file system
CN109271284A (en) * 2018-09-26 2019-01-25 郑州云海信息技术有限公司 A kind of fault recovery method, device and the equipment of server boot subregion
CN109614117A (en) * 2018-11-20 2019-04-12 山东超越数控电子股份有限公司 A kind of construction method and system, linux system mirror image of linux system mirror image
CN110287064B (en) * 2019-07-02 2020-04-17 成都易我科技开发有限责任公司 Method and device for restoring disk data and electronic equipment
CN112306374A (en) * 2019-07-31 2021-02-02 深圳Tcl新技术有限公司 Data clearing method, mobile terminal and storage medium
CN111831485B (en) * 2020-07-21 2023-01-13 平安科技(深圳)有限公司 Data recovery method, device, electronic equipment and medium
CN113064602A (en) * 2021-03-08 2021-07-02 山东英信计算机技术有限公司 Method, system and medium for filling operation system based on NFS
CN113612561B (en) * 2021-08-11 2023-06-20 中科南京移动通信与计算创新研究院 Method and system for starting baseband board of comprehensive tester based on ZYNQ architecture

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567136A (en) * 2010-12-15 2012-07-11 研祥智能科技股份有限公司 Backup and recovery method of computer system, device and computer system
CN103473067A (en) * 2013-09-23 2013-12-25 福建三元达软件有限公司 Embedded Linux partitioning and data recovery method, embedded Linux partitioning and data recovery system and system development method
CN104156277A (en) * 2014-07-29 2014-11-19 深圳市中兴移动通信有限公司 Mobile terminal and system restoring method and system restoring device thereof
CN104850469A (en) * 2015-05-12 2015-08-19 浪潮电子信息产业股份有限公司 LV mirror image-based method for realizing data backup, recovery and migration in linux system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012789B (en) * 2009-09-07 2014-03-12 云端容灾有限公司 Centralized management type backup and disaster recovery system
CN102331957B (en) * 2011-09-28 2013-08-28 华为技术有限公司 File backup method and device
CN103218273A (en) * 2012-01-20 2013-07-24 深圳市腾讯计算机系统有限公司 Hard disk data recovery method, server and distributed-memory system
CN104407938B (en) * 2014-11-21 2018-05-08 上海爱数信息技术股份有限公司 A kind of a variety of granularity restoration methods after virtual machine image level backup

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567136A (en) * 2010-12-15 2012-07-11 研祥智能科技股份有限公司 Backup and recovery method of computer system, device and computer system
CN103473067A (en) * 2013-09-23 2013-12-25 福建三元达软件有限公司 Embedded Linux partitioning and data recovery method, embedded Linux partitioning and data recovery system and system development method
CN104156277A (en) * 2014-07-29 2014-11-19 深圳市中兴移动通信有限公司 Mobile terminal and system restoring method and system restoring device thereof
CN104850469A (en) * 2015-05-12 2015-08-19 浪潮电子信息产业股份有限公司 LV mirror image-based method for realizing data backup, recovery and migration in linux system

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209525B (en) * 2018-04-24 2023-05-23 腾讯科技(深圳)有限公司 Operating system restoration method and device
CN110209525A (en) * 2018-04-24 2019-09-06 腾讯科技(深圳)有限公司 Operating system reduction method and device
CN110727545B (en) * 2018-07-17 2023-08-22 中标软件有限公司 Power-down protection method based on joint file system
CN110727545A (en) * 2018-07-17 2020-01-24 中标软件有限公司 Power failure protection method based on combined file system
CN111198744A (en) * 2018-11-16 2020-05-26 中标软件有限公司 Method for automatic application program containerization and mirror image backup release
CN111198744B (en) * 2018-11-16 2023-05-30 中标软件有限公司 Method for automatic application program containerization and mirror image backup release
CN109857345B (en) * 2019-01-31 2023-01-24 电科云(北京)科技有限公司 System and method for realizing disk mounting interface scheduling management based on concurrency
CN109857345A (en) * 2019-01-31 2019-06-07 合肥谐桐科技有限公司 Realize the system and method based on concurrent disk carry interface management and running
CN110457083B (en) * 2019-07-04 2023-07-18 深圳市中易通安全芯科技有限公司 Method and device for starting chip file system
CN110457083A (en) * 2019-07-04 2019-11-15 深圳市中易通安全芯科技有限公司 A kind of starting method and device of chip file system
CN110780930A (en) * 2019-09-23 2020-02-11 广州视源电子科技股份有限公司 Method and device for starting Android system, electronic equipment and storage medium
CN110780930B (en) * 2019-09-23 2023-06-06 广州视源电子科技股份有限公司 Method and device for starting Android system, electronic equipment and storage medium
CN112948170A (en) * 2019-12-10 2021-06-11 中标软件有限公司 Method for realizing system power-down protection by using snapshot function of equipment mapping
CN112948170B (en) * 2019-12-10 2024-04-09 中标软件有限公司 Method for realizing system power-down protection by using snapshot function of equipment mapping
CN114265628A (en) * 2021-12-22 2022-04-01 曙光信息产业股份有限公司 Deployment method, device, electronic equipment, storage medium and system of operating system
CN114924914A (en) * 2022-05-31 2022-08-19 广州鼎甲计算机科技有限公司 Disk partition table information backup and recovery method and system
CN116166472A (en) * 2023-03-01 2023-05-26 上海威固信息技术股份有限公司 Data recovery method and system for stored data
CN116166472B (en) * 2023-03-01 2024-04-16 上海威固信息技术股份有限公司 Data recovery method and system for stored data
CN116932465A (en) * 2023-09-15 2023-10-24 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Mirror image file management method, system, equipment and medium
CN116932465B (en) * 2023-09-15 2024-01-23 山东未来网络研究院(紫金山实验室工业互联网创新应用基地) Mirror image file management method, system, equipment and medium
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment
CN117032739B (en) * 2023-10-07 2024-01-09 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN106557384B (en) 2020-10-02
CN106557384A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
WO2017049828A1 (en) Method, device and system for data processing based on linux
EP3686739B1 (en) Method and system for enabling agentless backup and restore operations on a container orchestration platform
CN109783117B (en) Mirror image file making and starting method of diskless system
JP5681465B2 (en) Information processing system, information processing apparatus, preparation method, program, and recording medium
US9250824B2 (en) Backing up method, device, and system for virtual machine
US7747831B2 (en) High efficiency portable archive and data protection using a virtualization layer
US8738883B2 (en) Snapshot creation from block lists
CN100407205C (en) Method for optimizing a snapshot operation on a file basis
CN102799464A (en) Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system
US20210208982A1 (en) Data disaster recovery method and site
US11803412B2 (en) Containerized application management system and management method
CN110825399A (en) Deployment method and device of application program
JP2007133544A (en) Failure information analysis method and its implementation device
US8504869B2 (en) Kernel swapping systems and methods for recovering a network device
US10372557B2 (en) Versioning and recovery of workloads
US11829259B2 (en) Automated creation of variable data storage environments for application testing
JP2022155462A (en) System and method for distributed-agent backup of virtual machines
CN114281600A (en) Disaster recovery backup and recovery method, device, equipment and storage medium
KR101552580B1 (en) Method for system recovery including mobile device and backup supporting multi operation system
US9952807B1 (en) Virtual machine back-up
US20240111642A1 (en) Lossless failover for data recovery
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
CN116010248A (en) Test environment deployment method, system, device, electronic equipment and medium
CN115857968A (en) Operating system installation method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16847724

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16847724

Country of ref document: EP

Kind code of ref document: A1