CN114218010B - Data backup and recovery method, system, terminal equipment and storage medium - Google Patents

Data backup and recovery method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN114218010B
CN114218010B CN202210132797.5A CN202210132797A CN114218010B CN 114218010 B CN114218010 B CN 114218010B CN 202210132797 A CN202210132797 A CN 202210132797A CN 114218010 B CN114218010 B CN 114218010B
Authority
CN
China
Prior art keywords
data
backup
power supply
terminal equipment
recovery
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
CN202210132797.5A
Other languages
Chinese (zh)
Other versions
CN114218010A (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.)
Baike Data Technology Shenzhen Co ltd
Original Assignee
Baike Data Technology Shenzhen 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 Baike Data Technology Shenzhen Co ltd filed Critical Baike Data Technology Shenzhen Co ltd
Priority to CN202210132797.5A priority Critical patent/CN114218010B/en
Publication of CN114218010A publication Critical patent/CN114218010A/en
Application granted granted Critical
Publication of CN114218010B publication Critical patent/CN114218010B/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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • 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)
  • Power Sources (AREA)

Abstract

The invention discloses a data backup and recovery method, a system, a terminal device and a storage medium, wherein the method comprises the following steps: acquiring current input data, and determining a shutdown state according to the current input data; according to the shutdown state, backing up system data to an independent disk; when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk. The invention can save the system data in time and independently save the system data in the independent disk, can effectively avoid the thorough data loss caused by system crash or equipment damage, effectively prevent sudden accidents, can effectively back up and restore the system data and has high reliability.

Description

Data backup and recovery method, system, terminal equipment and storage medium
Technical Field
The present invention relates to the field of data flash technologies, and in particular, to a data backup and recovery method, system, terminal device, and storage medium.
Background
Data backup is the basis of disaster recovery, and refers to a process of copying all or part of a data set from a hard disk or an array of an application host to another storage medium in order to prevent data loss caused by misoperation of a system or system failure. The traditional data backup mainly adopts a built-in or external tape unit for cold backup. However, this method can only prevent human failures such as misoperation, and the recovery time is long. With the continuous development of the technology, the amount of data is increased, and a large number of enterprises begin to adopt network backup. Network backups are typically implemented by specialized data storage management software in conjunction with corresponding hardware and storage devices.
The existing electronic equipment, especially the traditional computer equipment, is often in a malicious shutdown problem in the use process, especially a computer for home office, is often in an unexpected shutdown due to various reasons in the use process, and data in the office process cannot be stored in time, so that the data is lost, great inconvenience is brought to people, and a great amount of time is wasted by people.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a data backup and recovery method, system, terminal device and storage medium for the above-mentioned defects in the prior art, and to solve the problem that data in the prior art often cannot be stored in time, resulting in data loss and great inconvenience to people.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a data backup and recovery method, where the method includes:
acquiring current input data, and determining a shutdown state according to the current input data;
according to the shutdown state, backing up system data to an independent disk;
when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk.
In one implementation, the obtaining current input data and determining a shutdown state according to the current input data includes:
detecting the power supply current of an external power supply and an internal power supply through a detection end to obtain current input data;
when the current input data is empty, determining that the shutdown state is abnormal shutdown;
and when the current input data is not empty, determining that the shutdown state is normal shutdown.
In one implementation, the backing up system data to an independent disk according to the shutdown state includes:
when the shutdown state is normal shutdown, acquiring a data backup requirement;
and if the data backup requirement is that data backup needs to be carried out, starting a preset capacitor power supply and backing up the system data to the independent disk.
In one implementation, the backing up system data to an independent disk according to the shutdown state includes:
and if the data backup requirement is that the data backup is not needed, directly shutting down.
In one implementation, the backing up system data to an independent disk according to the shutdown state includes:
and when the shutdown state is abnormal shutdown, automatically backing up the system data to the independent disk.
In one implementation, the obtaining a data recovery requirement when receiving a boot instruction, flashing the system data to a memory according to the data recovery requirement, and formatting the independent disk includes:
receiving the starting-up instruction, and determining whether backup system data exists or not;
if the backup system data exists, acquiring the data recovery requirement;
if the data recovery requirement is that recovery is needed, reading the system data in the independent disk, and flashing the system data into the memory;
and formatting the system data in the independent disk, and supplying energy to a preset capacitor power supply.
In one implementation, the obtaining a data recovery requirement when receiving a boot instruction, flashing the system data to a memory according to the data recovery requirement, and formatting the independent disk includes:
and if the data recovery requirement is that the data recovery is not needed, directly starting the machine and supplying energy to a preset capacitor power supply.
In a second aspect, an embodiment of the present invention further provides a data backup and recovery system, where the system includes:
the state determining module is used for acquiring current input data and determining a shutdown state according to the current input data;
the data backup module is used for backing up system data to the independent disk according to the shutdown state;
and the data recovery module is used for acquiring a data recovery requirement when a starting instruction is received, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a program of a data backup and recovery method that is stored in the memory and is executable on the processor, and when the processor executes the program of the data backup and recovery method, the step of the data backup and recovery method in any one of the above schemes is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a program of a data backup and recovery method is stored on the computer-readable storage medium, and when the program of the data backup and recovery method is executed by a processor, the steps of the data backup and recovery method in any one of the above schemes are implemented.
Has the advantages that: compared with the prior art, the invention provides a data backup and recovery method, which comprises the following steps: acquiring current input data, and determining a shutdown state according to the current input data; according to the shutdown state, backing up system data to an independent disk; when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk. The invention can save the system data in time and independently save the system data in the independent disk, can effectively avoid the thorough data loss caused by system crash or equipment damage, effectively prevent sudden accidents, can effectively back up and restore the system data and has high reliability.
Drawings
Fig. 1 is a flowchart of a specific implementation of a data backup and recovery method according to an embodiment of the present invention.
Fig. 2 is a schematic block diagram of a data backup and recovery system according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of an internal structure of a terminal device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The existing terminal equipment, especially the traditional computer equipment, is often powered off maliciously in the using process, especially the computers for home office use, and the unexpected power off is often caused by various reasons in the using process, and data in the office process cannot be stored in time, so that the data are lost, and great inconvenience is brought to people. Therefore, the embodiment provides a data backup and recovery method, and through the method of the embodiment, the thorough data loss caused by system crash or equipment damage can be effectively avoided, sudden accidents are effectively prevented, and the data safety is guaranteed. In specific implementation, the present embodiment first obtains current input data, and determines a shutdown state according to the current input data. And backing up system data to an independent disk according to the shutdown state. And finally, when a starting command is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk. The invention can save the system data in time and independently save the system data in the independent disk when the computer is shut down, can effectively avoid the complete data loss caused by system crash or equipment damage, can effectively backup and restore the system data and has high reliability.
For example, when a user uses a computer to work, the computer detects current input data in real time, and determines a power-off state according to the current input data, wherein the power-off state reflects whether the computer is normally powered off or abnormally powered off. Based on the determined shutdown state, the computer can save the system data at the moment in time. That is, when the computer is powered off, the computer automatically collects the system data, performs backup, and backs up the system data to an independent disk, so that the system data can be conveniently recovered and called when the computer is powered on subsequently. When the computer is started, the computer can obtain the data recovery requirement, namely, whether the data needs to be recovered is judged, if the data needs to be recovered, the system data in the independent disk can be flashed into the memory, and after the flashing, the independent disk can be formatted.
Exemplary method
In the data backup and recovery method in this embodiment, the data backup and recovery method may be applied to a terminal device, and the terminal device may be an intelligent product such as a computer, an intelligent television, a mobile phone, and the like. Specifically, as shown in fig. 1, the data backup and recovery method in this embodiment includes the steps of:
step S100, current input data are obtained, and a shutdown state is determined according to the current input data.
What this embodiment will realize is that can in time store system data when terminal equipment shuts down to prevent that terminal equipment from shutting down suddenly and causing the problem that system data loses. Therefore, in this embodiment, the terminal device needs to be monitored to determine whether the terminal device is powered off, and determine that the power off is normal, that is, determine the power off state. Therefore, the embodiment can acquire the current input data, the current input data is the power supply condition of the external power supply or the internal power supply for the terminal equipment, and the shutdown state can be determined according to the current input data.
In one implementation manner, when determining the shutdown state, the present embodiment includes the following steps:
s101, detecting the power supply current of an external power supply and an internal power supply through a detection end to obtain current input data;
step S102, when the current input data is empty, determining that the shutdown state is abnormal shutdown;
step S103, when the current input data is not empty, determining that the shutdown state is normal shutdown.
In specific implementation, the terminal device of this embodiment is preset with a detection end, and the detection end is used for detecting the power supply condition of the external power supply and the internal power supply of the terminal device to the terminal device, so as to obtain the current input data. In practical application, the detection end starts to detect the power supply current of the external power supply and the internal power supply when the terminal device starts a shutdown program, so that current input data can be acquired in time. When the detecting end normally detects the normal current input of the external power supply or the internal power supply, namely the current input data is not empty, the shutdown state is determined to be normal shutdown. And when the detection end does not normally detect the normal current input of the external power supply or the internal power supply, namely the current input data is empty, determining that the shutdown state is abnormal shutdown. In this embodiment, the shutdown state of the terminal device is determined, so that the system data of the terminal device is backed up according to the shutdown state.
And step S200, backing up system data to an independent disk according to the shutdown state.
When the shutdown state of the terminal device is determined, the embodiment can back up the system data according to the shutdown state, the purpose of the backup is to store the system data, and in order to conveniently back up the system data, an independent disk is arranged in the embodiment and is specially used for storing the system data. In this embodiment, the system data includes recorded data of the terminal device during use, such as log data, application use data, and data edited or input by the user (e.g., document input).
In an implementation manner, when backing up system data, the embodiment includes the following steps:
step S201, when the shutdown state is normal shutdown, acquiring a data backup requirement;
step S202, if the data backup requirement is that data backup needs to be performed, starting a preset capacitor power supply, and backing up the system data to the independent disk.
In specific implementation, the embodiment may determine whether the shutdown state of the terminal device is a normal shutdown or an abnormal shutdown, and execute different operations based on different shutdown states. When the shutdown state is normal shutdown, the detecting end detects normal current input, and at this time, the terminal device needs to determine whether system data needs to be backed up. Specifically, the terminal device may output a prompt message of a data backup requirement to inquire whether a backup is required at this time. When the user selects that data backup is needed, namely the data backup is needed, the data backup operation can be executed at the moment, and the system data can be backed up to the independent disk. In this embodiment, when performing a data backup operation, the present embodiment may start a predetermined capacitor power supply, which is to ensure that the system data can be successfully backed up. In another implementation manner, if the data backup requirement is that data backup is not needed (that is, a user selects that system data does not need to be backed up), the system is directly powered off.
In an implementation manner, if the shutdown state is abnormal shutdown, it indicates that the detecting end cannot detect normal current input, and it indicates unexpected shutdown, and in order to prevent data loss, the terminal device may automatically trigger a data backup operation to automatically backup the system data to the independent disk.
Step S300, when a starting command is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk.
When the data backup is completed, the system data cannot be lost, and the terminal equipment can recover and call the system data in the next using process. When the terminal equipment is started, the data recovery requirement can be obtained, namely whether the system data needs to be recovered or not can be obtained, so that the system data can be flashed into the memory according to the data recovery requirement. When the system data is recovered, the system data in the independent disk can be formatted.
In an implementation manner, when recovering system data, the embodiment includes the following steps:
step S301, receiving the starting-up instruction and determining whether backup system data exists or not;
step S302, if backup system data exists, acquiring the data recovery requirement;
step S303, if the data recovery requirement is that recovery is needed, reading the system data in the independent disk, and flashing the system data into the memory;
and S304, formatting the system data in the independent disk, and supplying energy to a preset capacitor power supply.
In specific implementation, the terminal device of this embodiment receives the boot instruction and enters the boot program.
At this time, the terminal device determines whether there is backup system data, that is, determines whether to backup the system data when the terminal device was last powered off. If the backup data exists, it needs to be determined whether to restore the backup data, that is, whether to restore the system data backed up when the system is powered off last time is determined. If the backup data does not exist, the terminal equipment can be directly and normally started up at the moment when the last shutdown of the terminal equipment is described and the system data is backed up. If the backup data exists, the terminal equipment can output prompt information of data recovery requirements at the moment, and then whether the recovery needs to be continued is determined according to the prompt information. If the user selects that the system data needs to be recovered, namely the data recovery requirement is that the system data needs to be recovered, the terminal device reads the system data in the independent disk at the moment, and then the system data is flashed into the memory, so that the recovery of the system data is realized. And when the system data is recovered, the terminal equipment formats the system data in the independent disk in time to make room for the independent disk, so that the system data needing to be backed up can be stored conveniently when the system is shut down next time. After the terminal equipment is started, the terminal equipment supplies energy to the preset capacitor power supply, so that the energy stored by the capacitor power supply is convenient for completing data backup operation when the terminal equipment is shut down. In another implementation manner, if the data recovery requirement is that recovery is not required, the device is directly started and supplies energy to a preset capacitor power supply.
In summary, the present embodiment obtains current input data, and determines a shutdown state according to the current input data; according to the shutdown state, backing up system data to an independent disk; when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk. The invention can save the system data in time and independently save the system data in the independent disk, can effectively avoid the thorough data loss caused by system crash or equipment damage, effectively prevent sudden accidents, can effectively back up and restore the system data and has high reliability.
Exemplary devices
Based on the foregoing embodiments, the present invention further provides a data backup and recovery system, where the data backup and recovery system in this embodiment includes a power management system, a processor, and a memory, and the power management system is connected to an external power supply or an internal power supply, and is connected to the internal processor and the internal memory. Further, as shown in fig. 1, the data backup and restore system further includes: a state determination module 10, a data backup module 20, and a data restore module. In this embodiment, the data backup and recovery system is provided with a capacitor power supply, a detection terminal and an independent disk for assisting and completing the whole data backup and recovery process. Specifically, the state determining module 10 is configured to obtain current input data, and determine a shutdown state according to the current input data. The data backup module 20 is configured to backup the system data to the independent disk according to the shutdown state. The data recovery module 30 is configured to, when a power-on instruction is received, obtain a data recovery requirement, flash the system data into a memory according to the data recovery requirement, and format the independent disk.
In one implementation, the state determination module 10 includes:
the current monitoring unit is used for detecting the power supply current of the external power supply and the internal power supply through the detection end to obtain the current input data;
the abnormal shutdown unit is used for determining that the shutdown state is abnormal shutdown when the current input data is null;
and the normal shutdown unit is used for determining that the shutdown state is normal shutdown when the current input data is not null.
In one implementation, the data backup module 20 includes:
the demand determining unit is used for acquiring a data backup demand when the shutdown state is normal shutdown;
and the data backup unit is used for starting a preset capacitor power supply and backing up the system data to the independent disk if the data backup requirement is that data backup is required.
In one implementation, the data backup module 20 further includes:
and the direct shutdown unit is used for directly shutting down the computer if the data backup requirement is that the data backup is not needed.
In one implementation, the data backup module 20 further includes:
and the automatic backup unit is used for automatically backing up the system data to the independent disk when the shutdown state is abnormal shutdown.
In one implementation, the data recovery module 30 includes:
the system data determining unit is used for receiving the starting instruction and determining whether the backup system data exists or not;
the recovery requirement determining unit is used for acquiring the data recovery requirement if the backup system data exists;
the system data recovery unit is used for reading the system data in the independent disk and flashing the system data to the memory if the data recovery requirement is that recovery is needed;
and the data formatting unit is used for formatting the system data in the independent disk and supplying energy to a preset capacitor power supply.
In one implementation, the data recovery module 30 further includes:
and the direct starting unit is used for directly starting up the computer and supplying energy to a preset capacitor power supply if the data recovery requirement is that the data recovery is not required.
The working principle of the data backup and recovery device in this embodiment is the same as that described in the above method embodiment, and is not described herein again.
Based on the above embodiments, the present invention further provides a terminal device, and a schematic block diagram thereof may be as shown in fig. 3. The terminal equipment comprises a processor and a memory which are connected through a system bus. Wherein the processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a data backup and restore method.
It will be understood by those skilled in the art that the block diagram shown in fig. 3 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the terminal device to which the solution of the present invention is applied, and a specific terminal device may include more or less components than those shown in the figure, or may combine some components, or have different arrangements of components.
In one embodiment, a terminal device is provided, where the terminal device includes a memory, a processor, and a data backup and recovery program stored in the memory and executable on the processor, and when the processor executes the data backup and recovery program, the following operation instructions are implemented:
acquiring current input data, and determining a shutdown state according to the current input data;
backing up system data to an independent disk according to the shutdown state;
when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by controlling the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, operational databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The invention discloses a data backup and recovery method, a system, a terminal device and a storage medium, wherein the method comprises the following steps: acquiring current input data, and determining a shutdown state according to the current input data; according to the shutdown state, backing up system data to an independent disk; when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk. The invention can save the system data in time and independently save the system data in the independent disk, can effectively avoid the thorough data loss caused by system crash or equipment damage, effectively prevent sudden accidents, can effectively back up and restore the system data and has high reliability.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (4)

1. A method for data backup and recovery, the method comprising:
acquiring current input data, and determining a shutdown state according to the current input data;
according to the shutdown state, backing up system data to an independent disk;
when a starting-up instruction is received, acquiring a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk;
the obtaining current input data and determining a shutdown state according to the current input data includes:
the method comprises the steps that a detection end is preset in the terminal equipment and used for detecting the power supply condition of an external power supply and an internal power supply of the terminal equipment to the terminal equipment; when the terminal equipment starts a shutdown program, the detection end starts to detect the power supply currents of the external power supply and the internal power supply;
when the detecting end normally detects that the normal current of the external power supply or the internal power supply is input, the current input data is not null, and the shutdown state is determined to be normal shutdown;
when the detection end does not normally detect that the normal current of the external power supply or the internal power supply is input, determining that the shutdown state is abnormal shutdown;
the backing up system data to an independent disk according to the shutdown state includes:
when the shutdown state is normal shutdown, the detecting end detects normal current input, and the terminal equipment needs to determine whether system data needs to be backed up or not;
the terminal equipment outputs prompt information of data backup requirements to inquire whether backup is needed or not;
when a user selects data backup to be performed, if the data backup is required, performing data backup operation, starting a preset capacitor power supply to backup system data to an independent disk, wherein the capacitor power supply is used for ensuring that the system data can be successfully backed up;
if the data backup requirement is that data backup is not needed, directly shutting down;
if the shutdown state is abnormal shutdown, the detecting end cannot detect normal current input, the terminal equipment can automatically trigger data backup operation, and the system data can be automatically backed up to the independent disk;
when receiving a starting instruction, the method for obtaining a data recovery requirement, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk comprises the following steps:
the terminal equipment receives a starting-up instruction and enters a starting-up program;
the terminal equipment judges whether backup system data exist or not;
if the backup data exists, determining whether to recover;
if the backup data does not exist, the terminal equipment does not backup the system data when the terminal equipment is powered off last time, and the terminal equipment is directly and normally powered on;
if the backup data exists, the terminal equipment outputs prompt information of data recovery requirements, and whether the recovery needs to be continued is determined according to the prompt information;
if the user selects that the system data needs to be recovered, the data recovery requirement is that the system data needs to be recovered, the terminal device reads the system data in the independent disk, and the system data is flashed into the memory to realize the recovery of the system data;
when the system data is recovered, the terminal equipment formats the system data in the independent disk in time to vacate the space of the independent disk;
after the terminal equipment is started, the terminal equipment supplies energy to a preset capacitor power supply, so that the capacitor power supply can store energy to facilitate the completion of data backup operation during shutdown;
and if the data recovery requirement is that the data recovery is not needed, directly starting the machine and supplying energy to a preset capacitor power supply.
2. A data backup and recovery system, the system comprising:
the state determining module is used for acquiring current input data and determining a shutdown state according to the current input data;
the data backup module is used for backing up system data to the independent disk according to the shutdown state;
the data recovery module is used for acquiring a data recovery requirement when a starting instruction is received, flashing the system data into a memory according to the data recovery requirement, and formatting the independent disk;
the state determination module includes:
the method comprises the steps that a detection end is preset in the terminal equipment and used for detecting the power supply condition of an external power supply and an internal power supply of the terminal equipment to the terminal equipment; when the terminal equipment starts a shutdown program, the detecting end starts to detect the power supply current of the external power supply and the internal power supply;
when the detecting end normally detects the normal current input of the external power supply or the internal power supply, if the current input data is not empty, determining that the shutdown state is normal shutdown;
when the detection end does not normally detect that the normal current of the external power supply or the internal power supply is input, determining that the shutdown state is abnormal shutdown;
the data backup module comprises:
when the shutdown state is normal shutdown, the detecting end detects normal current input, and the terminal equipment needs to determine whether system data needs to be backed up or not;
the terminal equipment outputs prompt information of data backup requirements to inquire whether backup is needed or not;
when a user selects data backup to be performed, if the data backup is required, performing data backup operation, starting a preset capacitor power supply to backup system data to an independent disk, wherein the capacitor power supply is used for ensuring that the system data can be successfully backed up;
if the data backup requirement is that data backup is not needed, directly shutting down;
if the shutdown state is abnormal shutdown, the detecting end cannot detect normal current input, the terminal equipment can automatically trigger data backup operation, and the system data can be automatically backed up to the independent disk;
the data recovery module comprises:
the terminal equipment receives a starting-up instruction and enters a starting-up program;
the terminal equipment judges whether backup system data exist or not;
if the backup data exists, determining whether to recover;
if the backup data does not exist, the terminal equipment does not backup the system data when the terminal equipment is powered off last time, and the terminal equipment is directly and normally powered on;
if the backup data exists, the terminal equipment outputs prompt information of data recovery requirements, and determines whether the recovery needs to be continued according to the prompt information;
if the user selects that the system data needs to be recovered, the data recovery requirement is that the system data needs to be recovered, the terminal device reads the system data in the independent disk, and the system data is flashed into the memory to realize the recovery of the system data;
when the system data is recovered, the terminal equipment formats the system data in the independent disk in time to vacate the space of the independent disk;
after the terminal equipment is started, the terminal equipment supplies energy to a preset capacitor power supply, so that the capacitor power supply can store energy to facilitate the completion of data backup operation during shutdown;
and if the data recovery requirement is that the data recovery is not needed, directly starting the machine and supplying energy to a preset capacitor power supply.
3. A terminal device, characterized in that the terminal device comprises a memory, a processor and a data backup and recovery program stored in the memory and operable on the processor, and the processor implements the steps of the data backup and recovery method according to claim 1 when executing the data backup and recovery program.
4. A computer-readable storage medium having stored thereon a data backup and restore program, which when executed by a processor, performs the steps of the data backup and restore method of claim 1.
CN202210132797.5A 2022-02-14 2022-02-14 Data backup and recovery method, system, terminal equipment and storage medium Active CN114218010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210132797.5A CN114218010B (en) 2022-02-14 2022-02-14 Data backup and recovery method, system, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210132797.5A CN114218010B (en) 2022-02-14 2022-02-14 Data backup and recovery method, system, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114218010A CN114218010A (en) 2022-03-22
CN114218010B true CN114218010B (en) 2022-05-27

Family

ID=80708855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210132797.5A Active CN114218010B (en) 2022-02-14 2022-02-14 Data backup and recovery method, system, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114218010B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106104492A (en) * 2014-12-25 2016-11-09 华为技术有限公司 A kind of method of data backup, Apparatus and system
CN106959386A (en) * 2017-03-30 2017-07-18 维沃移动通信有限公司 A kind of creepage detection method and mobile terminal
WO2020167287A1 (en) * 2019-02-11 2020-08-20 Hewlett-Packard Development Company, L.P. Recovery via backups of recovery information

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201788502U (en) * 2010-08-20 2011-04-06 北京联创信安科技有限公司 Magnetic-disc caching data backup and recovery device for accidental power outage
CN102831034B (en) * 2012-08-14 2016-04-20 中国电力科学研究院 Based on multimode backup and the quick recovery method of embedded equipment Linux
JP6396671B2 (en) * 2013-04-26 2018-09-26 株式会社半導体エネルギー研究所 Semiconductor device
CN109471757A (en) * 2018-11-19 2019-03-15 郑州云海信息技术有限公司 The method and system of NVDIMM-N backup are triggered when a kind of normal shutdown

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106104492A (en) * 2014-12-25 2016-11-09 华为技术有限公司 A kind of method of data backup, Apparatus and system
CN106959386A (en) * 2017-03-30 2017-07-18 维沃移动通信有限公司 A kind of creepage detection method and mobile terminal
WO2020167287A1 (en) * 2019-02-11 2020-08-20 Hewlett-Packard Development Company, L.P. Recovery via backups of recovery information

Also Published As

Publication number Publication date
CN114218010A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
US20040044890A1 (en) Apparatus and method for protecting failure of computer operating system
CN113064747A (en) Fault positioning method, system and device in server starting process
CN113064757B (en) Server firmware self-recovery system and server
US20210382789A1 (en) Method for protecting system from being powered off during upgrade and terminal device
CN108345464A (en) A kind of the startup method and Android vehicle device of Android system
CN108920301B (en) Data backup method and system, and data recovery method and system
CN111143132A (en) BIOS recovery method, device, equipment and readable storage medium
CN111552592A (en) Double-backup starting method and system
CN111767172A (en) Self-repairing method for set top box based on watchdog and bootloader
CN112612642A (en) Software starting and upgrading failure backspacing method and device and terminal equipment
CN113867807A (en) Method, device, equipment and storage medium for shortening power-on time of server
CN114218010B (en) Data backup and recovery method, system, terminal equipment and storage medium
CN111880636A (en) Power-off protection method of storage array and related device
CN116185510A (en) Partition switch starting method, array server and computer readable storage medium
CN115509815A (en) Method and device for protecting data in server
JP3231561B2 (en) Backup memory control method
JP2023536894A (en) ELECTRONIC DEVICE AND METHOD FOR CONTROLLING UPDATES OF DATA ON ELECTRONIC DEVICE
CN112040150A (en) Method and system for turning on and turning off mobile digital imaging system and readable storage medium
US20160004607A1 (en) Information processing apparatus and information processing method
JP6881389B2 (en) Parameter adjustment device for power converter
JP2009025967A (en) Backup system of duplicated firmware, method and operating system
JP3487127B2 (en) Information processing device, product registration device, and program storage medium
JPH0728572A (en) Automatic data preserving device at power interruption
CN112380083B (en) Method and system for testing master-slave switching stability of BMC (baseboard management controller)
CN117472457B (en) Dual BIOS (basic input output system), system switching method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant