1. Technical Field
Embodiments of the present disclosure relate to data management technology, and particularly to an electronic device and method for performing data backup and recovery in an electronic device.
2. Description of Related Art
Redundant array of independent disk (RAID) cards are used to transfer data synchronously using a plurality of disk drivers of an electronic device (e.g., a server), to improve a transmission speed of the disk drivers. The RAID card includes a plurality of components, such as an input/output (I/O) processor, a small computer system interface (SCSI) controller, an SCSI connector, and a memory. However, if configuration information lost, it is hard to recover/retrieve the configuration information from the memory of the RAID card. Therefore, a more efficient method for performing data backup and recovery of configuration information of a RAID card in an electronic device is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The RAID card 20 connects with the north bridge chip 21 through a data line or a signal line, such as a peripheral component interconnect express (PCI-E) bus. The north bridge chip 21 connects with the south bridge chip 22 and the processor 25 through data lines or signal lines. The south bridge chip 22 connects the storage device 23 and the BIOS 24 through the data lines or signal lines.
The data backup/recovery system 200 stores a backup file of configuration information of the RAID card 20 in the storage device 23, and restores the configuration information of the RAID card 20 using the backup file when the configuration information of the RAID card 20 is lost or destroyed. In one embodiment, the data backup/recovery system 200 may include computerized instructions in the form of one or more programs that are executed by the at least one processor 25 and stored in the storage device 23 (or memory). A detailed description of the data backup/recovery system 200 will be given in the following paragraphs.
In block S1, the initializing module 201 initializes the RAID card 20 when the electronic device 2 is started up (i.e., turned on). For example, the initializing module 201 initializes the RAID card 20 to load a bootstrap program of the RAID card 20.
In block S2, the setting module 202 receives preset configuration information of the RAID card 20. For example, a user may press specified keys (e.g., Ctrl+Z) through an input device (e.g., a keyboard) of the electronic device to enter a user interface in order to set the configuration information of the RAID card 20. In one embodiment, the preset configuration information includes, but is not limited to, a RAID level (e.g., RAID 5 or RAID 10) of the electronic device 2, a number of hard disks in the electronic device 2, and a storage capacity of each hard disk.
In block S3, the data backup module 203 obtains backup configuration information of the RAID card 20 by storing the preset configuration information into a backup file, and stores the backup file in the storage device 23. For example, the backup file may be stored in a firmware of the storage device 23, the storage device 23 may be a NAND flash memory.
In block S4, the data recovery module 204 determines if current configuration information of the RAID card 20 are correct when the electronic device 2 is started up at a next time. If the current configuration information of the RAID card 20 are identical to the backup configuration information, the data recovery module 204 determines that the current configuration are correct, the procedure goes to block S5. If the current configuration information of the RAID card 20 are not identical to the backup configuration information, the data recovery module 204 determines that the current configuration are incorrect, the procedure goes to block S6.
In block S5, the data recovery module 204 loads an operating system of the electronic device 2, such as a WINDOWS OS, or a LINUX OS, for example.
In block S6, the data recovery module 204 sets a flag value of the RAID card 20 as a first value (e.g., Flag=0), and restarts the electronic device 2. In one embodiment, the flag value is used to determine whether block S4 is executed or not when the electronic device 2 is started up.
For example, if the flag value is the first value, the data recovery module 204 does not determine if the current configuration information of the RAID card 20 are correct (i.e., block S4 is not executed) when the electronic device 2 is started up. If the flag value is a second value (e.g., Flag=1), the data recovery module 204 determines if the current configuration information of the RAID card 20 are correct (i.e., block S4 is executed) when the electronic device 2 is started up. It should be understood that, an initial value of the flag value is the second value.
In block S7, the data recovery module 204 updates the current configuration information of the RAID card 20 with the backup configuration information, sets the flag value as the second value, and restarts the electronic device 2. Then the procedure returns to block S4 to continue to check whether the current configuration information of the RAID card 20 are correct or incorrect.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
201110162016.9 | Jun 2011 | CN | national |