CN107402849B - Backup and recovery method based on K-UX system - Google Patents

Backup and recovery method based on K-UX system Download PDF

Info

Publication number
CN107402849B
CN107402849B CN201710639501.8A CN201710639501A CN107402849B CN 107402849 B CN107402849 B CN 107402849B CN 201710639501 A CN201710639501 A CN 201710639501A CN 107402849 B CN107402849 B CN 107402849B
Authority
CN
China
Prior art keywords
backup
server
disk
area
tar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710639501.8A
Other languages
Chinese (zh)
Other versions
CN107402849A (en
Inventor
闫笑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710639501.8A priority Critical patent/CN107402849B/en
Publication of CN107402849A publication Critical patent/CN107402849A/en
Application granted granted Critical
Publication of CN107402849B publication Critical patent/CN107402849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

Landscapes

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

Abstract

The invention discloses a backup and recovery method based on a K-UX system, which comprises the following steps: step 1, connecting a hard disk externally on a server as a backup disk, and backing up a K-UX system of the server to the backup disk by adopting dd and tar; step 2, thoroughly destroying the K-UX system; and 3, restoring the K-UX system through dd and tar. By adopting a mode of combining dd and tar for backing up the K-UX system, the compressed backup space can be considered, the reliability of system recovery can be improved, the maintenance efficiency of the system is improved, and the maintenance cost is reduced.

Description

Backup and recovery method based on K-UX system
Technical Field
The invention relates to the technical field of cloud computing data processing, in particular to a backup and recovery method based on a K-UX system.
Background
In the era of "internet +", a server is a support for data analysis, and reliable and stable operation of the server is a powerful guarantee for stable operation of each enterprise served by the server. However, due to various uncertain factors, such as power failure, human misoperation and the like, data loss of the server always occurs. Therefore, server system backup and recovery techniques are becoming important in this field.
At present, high-end fault-tolerant servers are widely sold in the industry, although technologies for data backup and recovery are more, backup and recovery related to a K-UX system of the server are less, and a corresponding backup and recovery system is urgently needed to ensure that the servers can operate more reliably and reduce loss caused by various possible unstable factors.
Disclosure of Invention
The invention aims to provide a backup and recovery method based on a K-UX system, which can be used for quickly recovering the system, improving the maintenance efficiency of the system and reducing the maintenance cost.
To solve the foregoing technical problem, an embodiment of the present invention provides a method for backup and recovery based on a K-UX system, including:
step 1, connecting a hard disk externally on a server as a backup disk, and backing up a K-UX system of the server to the backup disk by adopting dd and tar;
step 2, thoroughly destroying the K-UX system;
step 3, restoring the K-UX system through dd and tar;
the step 1 comprises the following steps:
externally connecting a hard disk on the server as a backup disk, and dividing the backup disk into a first area and a second area;
copying a boot efi file of a K-UX system of the server to a first area of the backup disc by dd;
compressing a root partition file of a K-UX system of the server by adopting tar and copying the root partition file to a second area of the backup disc;
the step 2 comprises the following steps:
uninstalling the backup disc from the server;
and (4) adopting rm to damage the K-UX system of the server, wherein the K-UX system is disabled and cannot be self-repaired.
Wherein, the step 3 comprises:
connecting a second storage with a second system installed with the server;
starting the server, and mounting the damaged system disk and the backup disk on the second system;
copying the boot efi file backed up on the first area of the backup disc to an area of the system disc that is damaged using dd;
and decompressing the root partition file of the second area on the backup disc to the damaged second area of the system disc by adopting tar.
Wherein, after the step 3, the method further comprises the following steps:
and 4, taking dd copying, tar compressing and decompressing and rm deleting of the K-UX system as log records and outputting the log records.
Judging whether operation instructions of dd copying, tar compressing and decompressing or rm deleting of the K-UX system appear or not;
and if so, verifying the operation instruction, and executing the operation instruction after the verification is passed.
The second memory is a U disk or a hard disk.
The storage space of the U disk is 8-16G.
Compared with the prior art, the backup and recovery method based on the K-UX system provided by the embodiment of the invention has the following advantages:
the method for backup and recovery based on the K-UX system provided by the embodiment of the invention comprises the following steps:
step 1, connecting a hard disk externally on a server as a backup disk, and backing up a K-UX system of the server to the backup disk by adopting dd and tar;
step 2, thoroughly destroying the K-UX system;
and 3, restoring the K-UX system through dd and tar.
According to the method for backing up and recovering the K-UX system, the K-UX system is backed up in a mode of combining dd and tar, so that the compressed backup space can be considered, the reliability of system recovery can be improved, the maintenance efficiency of the system is improved, and the maintenance cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating steps of a specific implementation of a backup and restore method based on a K-UX system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating steps of another specific implementation of a backup and recovery method based on a K-UX system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, fig. 1 is a schematic flowchart illustrating a step flow of an embodiment of a backup and recovery method based on a K-UX system according to an embodiment of the present invention; fig. 2 is a schematic flowchart illustrating steps of another specific implementation of a backup and recovery method based on a K-UX system according to an embodiment of the present invention.
In a specific embodiment, the method for backup and recovery based on the K-UX system includes:
step 1, connecting a hard disk externally on a server as a backup disk, and backing up a K-UX system of the server to the backup disk by adopting dd and tar;
step 2, thoroughly destroying the K-UX system;
and 3, restoring the K-UX system through dd and tar.
By adopting a mode of combining dd and tar for backing up the K-UX system, the compressed backup space can be considered, the reliability of system recovery can be improved, the maintenance efficiency of the system is improved, and the maintenance cost is reduced.
In order to further improve the efficiency of the system backup, in an embodiment of the present invention, the boot efi file in the system disk and the file of the root partition (containing data) are backed up in two areas of the backup disk, respectively, that is, step 1 includes:
externally connecting a hard disk on the server as a backup disk, and dividing the backup disk into a first area and a second area;
copying a boot efi file of a K-UX system of the server to a first area of the backup disc by dd;
and compressing the root partition file of the K-UX system of the server by adopting tar and copying the compressed root partition file to a second area of the backup disc.
By partitioning the backup disc, the start guide efi file and the root partition file are copied to the designated area of the backup disc, so that the two files can be simultaneously executed due to different operation areas in the operation process, the backup efficiency is greatly improved, the time required by backup is reduced, and the maintenance efficiency of the system is improved.
In the present invention, in the process of backing up and recovering a system, the original system needs to be damaged and removed, so that the original system does not affect the normal operation of the new system, and the utilization efficiency of the storage space can be reduced, therefore, in an embodiment of the present invention, the step 2 includes:
uninstalling the backup disc from the server;
and completely damaging the K-UX system by using rm.
The backup disc is unloaded from the server first, so that the possible damage to the backup system in the backup disc when the K-UX system is completely damaged by the rm in the follow-up process is avoided, the original K-UX system can be directly executed with all deletion instructions without area division and selection, and the reliability of the backup system is improved.
In order to improve flexibility and security of operation, in an embodiment of the present invention, the step 3 includes:
connecting a second storage with a second system installed with the server;
starting the server, and mounting the damaged second system and the backup disc on the second system;
copying the boot efi file backed up on the first area of the backup disc to an area of the system disc that is damaged using dd;
and decompressing the root partition file of the second area on the backup disc to the damaged second area of the system disc by adopting tar.
By adopting the second memory installed with the second system to operate independently, the flexibility of system recovery can be improved. The second system herein copies the startup boot efi file backed up in the first area of the backup disc to a damaged area of the system disc by dd after the damaged system disc and the backup disc are hung; and decompressing the root partition file of the second area on the backup disc to the damaged second area of the system disc by adopting tar, so that the recovery of the K-UX system can be realized.
It should be noted that, in the present invention, K1 is a high-end fault-tolerant server in the wave tide, K-UX wave is a Linux operating system developed by self, dd is a replication technique in the K-UX system, tar is a compression command in the K-UX system, and rm is a deletion command in the K-UX system.
The method for backing up and recovering based on the K-UX system is not only suitable for the Linux operating system, but also suitable for backing up and recovering other systems.
In order to further implement the detection of possible operation errors in the backup and recovery of the system and improve the efficiency of system maintenance, after the step 3, the method further includes:
and 4, taking dd copying, tar compressing and decompressing and rm deleting of the K-UX system as log records and outputting the log records.
By recording and outputting the instructions received by the K-UX system in the whole process of carrying out system backup and recovery, the fault reason can be quickly positioned when a new system fault occurs, and the reliability of system recovery is improved.
After the step 4, judging whether operation instructions of dd copying, tar compressing and decompressing or rm deleting for the K-UX system occur;
and if so, verifying the operation instruction, and executing the operation instruction after the verification is passed.
By performing instruction verification in the process of system backup and recovery, it is clear that the operator with the authority is performing system backup, but other operators do illegal operations, the possibility of system data loss can be reduced, and the safety of system data is ensured.
The second memory is a U disk or the hard disk.
In order to further improve the flexibility of system recovery, the second memory is a U disk, and the storage space of the U disk is 8-16G. Of course, the space of the usb disk herein refers to the space that can be used actually, and the storage space thereof can be reasonably selected according to the total amount of data of the boot file and the root partition. The U disk is used for system recovery, the U disk system operates independently, and the flexibility and the safety of operation are improved.
In summary, according to the method for backing up and recovering based on the K-UX system provided by the embodiment of the present invention, the K-UX system is backed up by combining dd and tar, so that not only the backup space can be compressed, but also the reliability of system recovery can be improved, the maintenance efficiency of the system is improved, and the maintenance cost is reduced.
The backup and recovery method based on the K-UX system provided by the invention is described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (6)

1. A method for backup and recovery based on a K-UX system is characterized by comprising the following steps:
step 1, connecting a hard disk externally on a server as a backup disk, and backing up a K-UX system of the server to the backup disk by adopting dd and tar;
step 2, thoroughly destroying the K-UX system;
step 3, restoring the K-UX system through dd and tar;
the step 1 comprises the following steps:
externally connecting a hard disk on the server as a backup disk, and dividing the backup disk into a first area and a second area;
copying a boot efi file of a K-UX system of the server to a first area of the backup disc by dd;
compressing a root partition file of a K-UX system of the server by adopting tar and copying the root partition file to a second area of the backup disc;
the step 2 comprises the following steps:
uninstalling the backup disc from the server;
and (4) adopting rm to damage the K-UX system of the server, wherein the K-UX system is disabled and cannot be self-repaired.
2. The method for K-UX system based backup and recovery according to claim 1, wherein the step 3 includes:
connecting a second storage with a second system installed with the server;
starting the server, and mounting the damaged system disk and the backup disk on the second system;
copying the boot efi file backed up on the first area of the backup disc to an area of the system disc that is damaged using dd;
and decompressing the root partition file of the second area on the backup disc to the damaged second area of the system disc by adopting tar.
3. The method for K-UX system based backup and recovery according to claim 2, further comprising, after step 3:
and 4, taking dd copying, tar compressing and decompressing and rm deleting of the K-UX system as log records and outputting the log records.
4. The method for the backup and recovery based on the K-UX system of claim 3, wherein after the step 4, the method further comprises the steps of judging whether operation instructions of dd copying, tar compressing and decompressing or rm deleting to the K-UX system occur;
and if so, verifying the operation instruction, and executing the operation instruction after the verification is passed.
5. The method for K-UX system based backup and recovery according to claim 4, wherein the second storage is a usb disk or a hard disk.
6. The method for backup and recovery based on K-UX system of claim 5, wherein the storage space of the U disk is 8G ~ 16G.
CN201710639501.8A 2017-07-31 2017-07-31 Backup and recovery method based on K-UX system Active CN107402849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710639501.8A CN107402849B (en) 2017-07-31 2017-07-31 Backup and recovery method based on K-UX system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710639501.8A CN107402849B (en) 2017-07-31 2017-07-31 Backup and recovery method based on K-UX system

Publications (2)

Publication Number Publication Date
CN107402849A CN107402849A (en) 2017-11-28
CN107402849B true CN107402849B (en) 2020-11-27

Family

ID=60401382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710639501.8A Active CN107402849B (en) 2017-07-31 2017-07-31 Backup and recovery method based on K-UX system

Country Status (1)

Country Link
CN (1) CN107402849B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207816A (en) * 2013-04-08 2013-07-17 浪潮电子信息产业股份有限公司 Linux system repairing method
CN105138431A (en) * 2015-08-27 2015-12-09 厦门市美亚柏科信息股份有限公司 Linux system back-up and restoring method
CN105446771A (en) * 2015-11-13 2016-03-30 浪潮电子信息产业股份有限公司 Method for quickly and automatically installing operating system based on USB flash disk
CN105786575A (en) * 2016-03-17 2016-07-20 北京奇虎科技有限公司 Mobile terminal and data elimination avoiding method thereof during system rewriting
CN106557384A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 Based on the data processing method of Linux, device and system
CN106815098A (en) * 2017-01-20 2017-06-09 杭州当虹科技有限公司 Setting backup and the method and system for recovering based on linux system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207816A (en) * 2013-04-08 2013-07-17 浪潮电子信息产业股份有限公司 Linux system repairing method
CN105138431A (en) * 2015-08-27 2015-12-09 厦门市美亚柏科信息股份有限公司 Linux system back-up and restoring method
CN106557384A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 Based on the data processing method of Linux, device and system
CN105446771A (en) * 2015-11-13 2016-03-30 浪潮电子信息产业股份有限公司 Method for quickly and automatically installing operating system based on USB flash disk
CN105786575A (en) * 2016-03-17 2016-07-20 北京奇虎科技有限公司 Mobile terminal and data elimination avoiding method thereof during system rewriting
CN106815098A (en) * 2017-01-20 2017-06-09 杭州当虹科技有限公司 Setting backup and the method and system for recovering based on linux system

Also Published As

Publication number Publication date
CN107402849A (en) 2017-11-28

Similar Documents

Publication Publication Date Title
US11762740B2 (en) Systems and methods for efficient backup restoration
US7627728B1 (en) System and method for efficient generation of application snapshots
EP2539820B1 (en) System and method for failing over cluster unaware applications in a clustered system
US9377964B2 (en) Systems and methods for improving snapshot performance
US10127119B1 (en) Systems and methods for modifying track logs during restore processes
US11221927B2 (en) Method for the implementation of a high performance, high resiliency and high availability dual controller storage system
EP3238063B1 (en) Techniques for data backup and restoration
US9524215B1 (en) Systems and methods for managing virtual machine backups
US20140140135A1 (en) Storage device, recovery method, and recording medium for recovery program
US9003139B1 (en) Systems and methods for recovering virtual machines after disaster scenarios
US20210349748A1 (en) Virtual machine restoration for anomaly condition evaluation
CN110727545B (en) Power-down protection method based on joint file system
CN107402849B (en) Backup and recovery method based on K-UX system
CN109104314B (en) Method and device for modifying log configuration file
US11226875B2 (en) System halt event recovery
US20160004607A1 (en) Information processing apparatus and information processing method
US9465710B1 (en) Systems and methods for predictively preparing restore packages
KR20010046058A (en) Non-stop auto backup/restore program for pc's
US20120150809A1 (en) Disaster recovery services
CN106250269A (en) The file system data restoration methods of a kind of virtual machine and system
CN114253765A (en) Data recovery method and related equipment
CN118245069A (en) Terminal reconstruction method, device, equipment and storage medium
CN112685233A (en) Data backup and restoration method and device based on Linux operating system
CN111382118A (en) Computer-aided management method and system
CN107315651A (en) A kind of technology based on virtualization backup

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201109

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant