CN101436152B - Method and device for data backup - Google Patents

Method and device for data backup Download PDF

Info

Publication number
CN101436152B
CN101436152B CN200810180577XA CN200810180577A CN101436152B CN 101436152 B CN101436152 B CN 101436152B CN 200810180577X A CN200810180577X A CN 200810180577XA CN 200810180577 A CN200810180577 A CN 200810180577A CN 101436152 B CN101436152 B CN 101436152B
Authority
CN
China
Prior art keywords
data
block address
logical block
address group
backup
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.)
Expired - Fee Related
Application number
CN200810180577XA
Other languages
Chinese (zh)
Other versions
CN101436152A (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.)
Huawei Digital Technologies Chengdu Co Ltd
Original Assignee
Huawei Symantec Technologies 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 Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN200810180577XA priority Critical patent/CN101436152B/en
Publication of CN101436152A publication Critical patent/CN101436152A/en
Application granted granted Critical
Publication of CN101436152B publication Critical patent/CN101436152B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The embodiment of the invention discloses a method and a device for data backup. The method comprises the following steps of receiving a backup commands carrying a source logic-block address set and an objective logic-block address set, storing data in the source logic-block address set to a high-speed cache memory inside a solid-state hard disk according to the backup commands, and storing the data in the high-speed cache memory to the objective logic-block address set. In the embodiment of the invention, as the internal data backup of the solid-state hard disk is realized by use of the high-speed cache memory inside the solid-state hard disk, data interaction with the cache of a host is not needed, so that the speed of data backup is raised.

Description

Data backup method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for data backup.
Background
The solid state disk has the advantages of high read-write performance, strong shock resistance, low power consumption and the like, and is widely applied to the fields of military affairs, vehicle-mounted, industrial control, video monitoring, network terminals, electric power, medical treatment, aviation and the like, navigation equipment and the like.
In the process of internal data backup of data in the solid state disk, data in a source logical block address group to be backed up needs to be cached in a cache memory inside the solid state disk, then the data in the cache memory is read out and written into a cache of a host, then the data stored in the cache of the host is read out and written back into the cache memory inside the solid state disk, and finally the data in the cache memory is read out and written into a target logical block address group of the solid state disk.
In the process of implementing the invention, the inventor finds that the following defects exist in the prior art:
in the prior art, the process of performing internal data backup on data in the solid state disk needs to be realized by performing data interaction with a cache of a host, so that the speed of data backup is reduced.
Disclosure of Invention
The embodiment of the invention provides a data backup method and device, which improve the data backup speed.
The embodiment of the invention provides a data backup method, which comprises the following steps:
receiving a backup command carrying a source logical block address group and a target logical block address group;
storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command;
and storing the data in the cache memory into the target logical block address group to realize internal data backup of the solid state disk, wherein the data backup inside the solid state disk does not need to exchange data with a cache of a host.
The embodiment of the invention provides a device for realizing data backup, which comprises a receiving unit, a cache memory and a processing unit, wherein the receiving unit, the cache memory and the processing unit
The receiving unit is used for receiving a backup command carrying a source logical block address group and a target logical block address group;
the processing unit is used for storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command received by the receiving unit, storing the data in the cache memory into the target logical block address group, and realizing internal data backup of the solid state disk, wherein the data backup inside the solid state disk does not need to exchange data with a cache of a host.
In the embodiment of the invention, the internal data backup of the solid state disk is realized by utilizing the cache memory in the solid state disk, and the data interaction with the cache of the host is not needed, so that the data backup speed is improved.
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 described below, and it is obvious that the drawings in the following description are only 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 flow chart of a method for backing up data according to an embodiment of the present invention;
fig. 2 is a structural diagram of an apparatus for implementing data backup in 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 some, not all, embodiments of the present invention. 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.
An embodiment of the present invention provides a data backup method, as shown in fig. 1, including the following steps:
step 101, receiving a backup command carrying a source logical block address group and a destination logical block address group.
The backup command may be a COPY _ BACK command newly added in an ATA (Advanced Technology Attachment) protocol.
Wherein each logical block address value in the logical address group may be carried in a COPY _ BACK command; the start logical address value and the data length value of the logical address group may also be carried in the COPY BACK command.
Because the backup command needs to include at least two LBA (Logical Block Address) values, and a single command issued by the host can only transmit one LBA value to the solid state disk, transmission of the command cannot be completed at one time. The host can decompose the COPY _ BACK command into two decomposition commands to be issued, command codes of the two issued commands can be the same or different (the command codes can be defined by themselves), meanwhile, a command identifier for indicating that the two decomposition commands belong to the same COPY _ BACK command is required, and the solid state disk can identify that the two decomposition commands belong to the same COPY _ BACK command according to the command identifier. In addition, ordinal numbers of the two decomposition commands can be set, the decomposition command with the lower ordinal number carries information of a source logical block address group, the decomposition command with the higher ordinal number carries information of a target logical block address group, and the solid state disk can identify the source logical block address group and the target logical block address group according to the ordinal numbers of the two decomposition commands.
Table 1 is a simple COPY BACK split command.
TABLE 1 COPY _ BACK decomposition Command
Figure G200810180577XD0003180622QIETU
Wherein PRE is the ordinal number of the COPY _ BACK decomposition command;
wherein, Tag is a command identifier, and two decomposition commands belonging to the same COPY _ BACK command need to adopt the same command identifier;
wherein, the Sector count is the length of data to be backed up;
wherein, the LBA is the logical block address;
wherein, F0 is COPY _ BACK command code.
Tables 2 and 3 are two decomposition commands based on the COPY _ BACK decomposition command defined in table 1.
TABLE 2 first decompose Command
Figure G200810180577XD00041
TABLE 3 second decompose Command
Figure G200810180577XD00042
The COPY BACK command shown in tables 2 and 3 has the following meaning:
data with a starting LBA address of 0x0 and a data length of 6 SECTORs is backed up to an address with a starting LBA address of 0 xFFFF.
And 102, storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command.
The step of storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command comprises the following steps:
reading data in the source logical block address group;
writing the read data into the cache memory.
Step 103, storing the data in the cache memory into the destination logical block address group.
Wherein the storing the data in the cache memory into the destination logical block address group comprises:
reading data in the cache memory;
and writing the read data into the destination logical block address group.
In the embodiment of the invention, the internal data backup of the solid state disk is realized by utilizing the cache memory in the solid state disk, and the data interaction with the cache of the host is not needed, so that the data backup speed is improved.
An apparatus for implementing data backup is provided in the embodiment of the present invention, as shown in fig. 2, and includes a receiving unit 201, a cache memory 202, and a processing unit 203, wherein,
a receiving unit 201, configured to receive a backup command carrying a source logical block address group and a destination logical block address group;
a processing unit 203, configured to store the data in the source logical block address group into the cache memory 202 according to the backup command received by the receiving unit 201, and store the data in the cache memory 202 into the destination logical block address group.
The backup command may be a COPY BACK command newly added in the ATA protocol.
Wherein the processing unit 203 comprises:
a reading subunit 2031, configured to read data in the source logical block address group;
a write subunit 2032 for writing the data read by the read subunit 2031 into the cache memory 202.
Wherein,
a read subunit 2031, further configured to read data in the cache memory 202;
the writing subunit 2032 is further configured to write the data read by the reading subunit 2031 into the destination logical block address group.
The device for realizing data backup can be a solid state disk.
In the embodiment of the invention, the internal data backup of the solid state disk is realized by utilizing the cache memory in the solid state disk, and the data interaction with the cache of the host is not needed, so that the data backup speed is improved.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in the embodiments of the present invention.
In short, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method of data backup, comprising the steps of:
receiving a backup command carrying a source logical block address group and a target logical block address group, wherein the backup command is a COPY _ BACK command newly added in an Advanced Technology Attachment (ATA) protocol, the COPY _ BACK command comprises two decomposition commands, and the two decomposition commands respectively carry the source logical block address group and the target logical block address group;
storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command;
and storing the data in the cache memory into the target logical block address group to realize internal data backup of the solid state disk, wherein the data backup inside the solid state disk does not need to exchange data with a cache of a host.
2. The method of claim 1, wherein the two split commands are provided with the same command identification for identifying that the two split commands belong to the same COPY BACK command.
3. The method of claim 1 or 2, wherein the storing the data in the source logical block address group into a cache memory inside the solid state disk according to the backup command comprises:
reading data in the source logical block address group according to the backup command;
writing the read data into the cache memory.
4. The method of claim 1 or 2, wherein storing the data in the cache memory into the destination logical block address group comprises:
reading data in the cache memory;
and writing the read data into the destination logical block address group.
5. An apparatus for implementing data backup, comprising a receiving unit, a cache memory and a processing unit, wherein
The receiving unit is configured to receive a backup command carrying a source logical block address group and a destination logical block address group, where the backup command is a COPY _ BACK command newly added in an advanced technology attachment ATA protocol, and the COPY _ BACK command includes two decomposition commands, where the two decomposition commands respectively carry the source logical block address group and the destination logical block address group;
the processing unit is used for storing the data in the source logical block address group into the cache memory according to the backup command received by the receiving unit, storing the data in the cache memory into the target logical block address group, and realizing internal data backup of the solid state disk, wherein the data backup in the solid state disk does not need to exchange data with a cache of a host.
6. The apparatus of claim 5, wherein the processing unit comprises:
a reading subunit, configured to read data in the source logical block address group;
a write subunit for writing the data read by the read subunit into the cache memory.
7. The apparatus of claim 6,
the reading subunit is further configured to read data in the cache memory;
and the writing subunit is further configured to write the data read by the reading subunit into the destination logical block address group.
CN200810180577XA 2008-12-02 2008-12-02 Method and device for data backup Expired - Fee Related CN101436152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810180577XA CN101436152B (en) 2008-12-02 2008-12-02 Method and device for data backup

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810180577XA CN101436152B (en) 2008-12-02 2008-12-02 Method and device for data backup

Publications (2)

Publication Number Publication Date
CN101436152A CN101436152A (en) 2009-05-20
CN101436152B true CN101436152B (en) 2013-01-23

Family

ID=40710599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810180577XA Expired - Fee Related CN101436152B (en) 2008-12-02 2008-12-02 Method and device for data backup

Country Status (1)

Country Link
CN (1) CN101436152B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166749A1 (en) * 2009-09-08 2012-06-28 International Business Machines Corporation Data management in solid-state storage devices and tiered storage systems
CN102298547A (en) * 2011-09-20 2011-12-28 杭州华三通信技术有限公司 Data backup method and device
CN102622307B (en) * 2012-02-27 2016-03-30 记忆科技(深圳)有限公司 The method of operating of hard disc data and hard disk controller
US10831727B2 (en) 2012-05-29 2020-11-10 International Business Machines Corporation Application-controlled sub-LUN level data migration
US10817202B2 (en) 2012-05-29 2020-10-27 International Business Machines Corporation Application-controlled sub-LUN level data migration
US10831728B2 (en) 2012-05-29 2020-11-10 International Business Machines Corporation Application-controlled sub-LUN level data migration
CN102929748B (en) * 2012-11-08 2015-11-25 华为技术有限公司 Data back up method and device
CN102929792B (en) * 2012-11-12 2016-03-30 华为技术有限公司 Data movement method and system, memory device and main frame
CN104281505B (en) * 2013-07-03 2017-07-28 北京联想核芯科技有限公司 Data back up method, device and electronic equipment
CN104346238B (en) * 2013-08-06 2018-12-14 联想(北京)有限公司 A kind of data back up method, device and terminal
DE112013005903T5 (en) * 2013-10-09 2015-09-10 Hitachi, Ltd. Storage system and storage control method
CN103761988B (en) * 2013-12-27 2018-01-16 华为技术有限公司 Solid state hard disc and data movement method
CN105760251B (en) * 2014-12-15 2019-04-19 华为技术有限公司 A kind of method and apparatus of Backup Data
CN106528330A (en) * 2016-10-29 2017-03-22 华为技术有限公司 Data backup method, node and data backup system
CN107273306B (en) * 2017-06-19 2021-01-12 苏州浪潮智能科技有限公司 Data reading and writing method for solid state disk and solid state disk
CN111913835A (en) * 2020-07-30 2020-11-10 深圳忆联信息***有限公司 Data multi-backup storage method and device based on cross mapping, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1871587A (en) * 2003-10-20 2006-11-29 罗得岛及普罗维登斯属地高等教育管理委员会 Bottom-up cache structure for storage servers

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1871587A (en) * 2003-10-20 2006-11-29 罗得岛及普罗维登斯属地高等教育管理委员会 Bottom-up cache structure for storage servers

Also Published As

Publication number Publication date
CN101436152A (en) 2009-05-20

Similar Documents

Publication Publication Date Title
CN101436152B (en) Method and device for data backup
US9652384B2 (en) Apparatus, system and method for caching compressed data
CN101826107B (en) Hash data processing method and device
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
TW201629774A (en) Caching technologies employing data compression
CN101630290A (en) Method and device of processing repeated data
CN103034592A (en) Data processing method and device
CN103955433A (en) Shingled magnetic recording hard disk, and method and device for writing data in shingled magnetic recording hard disk
CN103095686A (en) Hot metadata access control method and server
CN102971698A (en) Snapshot data-processing method and system, storage system and snapshot agency
CN105224560A (en) Data cached lookup method and device
CN112084070B (en) L2P mapping data recovery method and device, storage medium and electronic equipment
US20150331613A1 (en) Media write operation
CN104408126B (en) A kind of persistence wiring method of database, device and system
CN107798063B (en) Snapshot processing method and snapshot processing device
CN106873905B (en) The method, apparatus and solid state hard disk of data storage
CN104462148A (en) Data storage management method and device
CN105260130B (en) A kind of reading/writing method of Seagate hard-disk system file
CN102301369A (en) Data storage device access method and device
US11620089B2 (en) Non-volatile storage of high resolution tape directory
CN103064926A (en) Data processing method and device
JP2013235530A5 (en)
CN105205017A (en) Storage controller based on PCIE SSD
CN103577113B (en) A kind of memory unit access method
CN105827681A (en) Backup data transmission method under SAN (Storage Area Network)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: Huawei Symantec Technologies Co., Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: Chengdu Huawei Symantec Technologies Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130123

Termination date: 20191202