Movatterモバイル変換


[0]ホーム

URL:


CN105760251A - A method and device for backing up data - Google Patents

A method and device for backing up data
Download PDF

Info

Publication number
CN105760251A
CN105760251ACN201410779452.4ACN201410779452ACN105760251ACN 105760251 ACN105760251 ACN 105760251ACN 201410779452 ACN201410779452 ACN 201410779452ACN 105760251 ACN105760251 ACN 105760251A
Authority
CN
China
Prior art keywords
partition
backed
lun
storage capacity
lun device
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.)
Granted
Application number
CN201410779452.4A
Other languages
Chinese (zh)
Other versions
CN105760251B (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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei 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 Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to CN201410779452.4ApriorityCriticalpatent/CN105760251B/en
Publication of CN105760251ApublicationCriticalpatent/CN105760251A/en
Application grantedgrantedCritical
Publication of CN105760251BpublicationCriticalpatent/CN105760251B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明公开了一种备份数据的方法和装置,属于计算机领域。所述方法包括:磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;磁盘存储系统根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。采用本发明,可以节约存储系统的存储资源。

The invention discloses a method and a device for backing up data, belonging to the field of computers. The method includes: the disk storage system receives a backup request sent by the terminal and carries the partition ID corresponding to the first partition to be backed up and the logical unit number LUN device ID; the disk storage system according to the partition ID corresponding to the first partition to be backed up and LUN device identification, determine the storage capacity of the first partition to be backed up; among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the determined A query message of a partition identifier and a LUN device identifier corresponding to a partition; receiving a selection message sent by the terminal and carrying a partition identifier and a LUN device identifier corresponding to the first target partition in the determined partitions, and converting the first The data of the partition to be backed up is backed up to the first target partition. By adopting the invention, the storage resources of the storage system can be saved.

Description

Translated fromChinese
一种备份数据的方法和装置A method and device for backing up data

技术领域technical field

本发明涉及计算机技术领域,特别涉及一种备份数据的方法和装置。The invention relates to the technical field of computers, in particular to a method and device for backing up data.

背景技术Background technique

随着计算机技术的发展,人们对数据存储的需要越来越多,需要的存储空间也越来越大,为此,运营商通过磁盘存储系统向用户提供存储空间,以使用户可以存储更多的数据。With the development of computer technology, people have more and more needs for data storage, and the storage space required is also increasing. Therefore, operators provide users with storage space through disk storage systems, so that users can store more The data.

磁盘存储系统中使用磁盘来存储数据,技术人员会将磁盘封装成多个LUN(LogicalUnitNumber,逻辑单元号)设备。在磁盘存储系统的使用过程中,经常需要对已存储的数据进行备份,这时,需要将磁盘中的某个LUN设备中存储的数据进行备份,存储到其他LUN设备中。In a disk storage system, disks are used to store data, and technicians will encapsulate the disks into multiple LUN (LogicalUnitNumber, Logical Unit Number) devices. During the use of the disk storage system, it is often necessary to back up stored data. At this time, the data stored in a certain LUN device in the disk needs to be backed up and stored in other LUN devices.

在实现本发明的过程中,发明人发现现有技术至少存在以下问题:In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:

在对数据进行备份时,需要对整个LUN设备进行备份,因此,当需要对LUN设备中的部分数据进行备份时,仍要对该分区所属的整个LUN设备进行备份,这样会占用大量的存储资源。When backing up data, the entire LUN device needs to be backed up. Therefore, when part of the data in the LUN device needs to be backed up, the entire LUN device to which the partition belongs must still be backed up, which will occupy a large amount of storage resources. .

发明内容Contents of the invention

为了解决现有技术的问题,本发明实施例提供了一种备份数据的方法和装置。所述技术方案如下:In order to solve the problems in the prior art, embodiments of the present invention provide a method and device for backing up data. Described technical scheme is as follows:

第一方面,提供了一种备份数据的方法,所述方法包括:In a first aspect, a method for backing up data is provided, the method comprising:

磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;The disk storage system receives the backup request sent by the terminal and carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up;

磁盘存储系统根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;The disk storage system determines the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up;

在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;In each local partition, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying the partition identifier and the LUN device identifier corresponding to the determined partition;

接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first target partition middle.

结合第一方面,在该第一方面的第一种可能实现方式中,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:With reference to the first aspect, in the first possible implementation manner of the first aspect, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the The query message carrying the partition identifier and LUN device identifier corresponding to the determined partition includes:

在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。In each local partition, determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition.

结合第一方面,在该第一方面的第二种可能实现方式中,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:With reference to the first aspect, in a second possible implementation of the first aspect, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the The query message carrying the partition identifier and LUN device identifier corresponding to the determined partition includes:

在本地的各分区中,确定未存储数据的分区;Among the local partitions, determine the partitions that do not store data;

确定所述未存储数据的分区中存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up among the partitions that do not store data, and sending a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition to the terminal.

结合第一方面,在该第一方面的第三种可能实现方式中,所述磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求之前,所述方法还包括:With reference to the first aspect, in a third possible implementation of the first aspect, before the disk storage system receives the backup request sent by the terminal and carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up , the method also includes:

确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Determine the start address and end address corresponding to each partition in each LUN device of the disk storage system in the disk.

结合第一方面,在该第一方面的第四种可能实现方式中,所述方法还包括:With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes:

当达到预设周期时,将预先设置的第二待备份分区的数据备份到第二目标分区中。When the preset period is reached, the preset data of the second partition to be backed up is backed up to the second target partition.

结合第一方面,在该第一方面的第五种可能实现方式中,所述将所述第一待备份分区的数据备份到所述第一目标分区中之后,所述方法还包括:With reference to the first aspect, in a fifth possible implementation manner of the first aspect, after backing up the data of the first partition to be backed up to the first target partition, the method further includes:

当检测到所述第一待备份分区中的数据损坏时,将所述第一目标分区中的数据复制到所述第一待备份分区中。When it is detected that the data in the first partition to be backed up is damaged, the data in the first target partition is copied to the first partition to be backed up.

结合第一方面,在该第一方面的第六种可能实现方式中,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:With reference to the first aspect, in a sixth possible implementation manner of the first aspect, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the The query message carrying the partition identifier and LUN device identifier corresponding to the determined partition includes:

在本地的各分区和各LUN设备中,确定存储量大于或等于所述第一待备份分区的存储量的分区或LUN设备,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识,以及确定出的LUN设备对应的LUN设备标识的查询消息;Among the local partitions and LUN devices, determine the partition or LUN device whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the partition ID and LUN device ID corresponding to the determined partition to the terminal , and a query message of the LUN device ID corresponding to the determined LUN device;

所述接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中,包括:receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first In the target partition, include:

接收所述终端发送的携带有所述确定出的分区和LUN设备中的第一目标分区对应的分区标识和LUN设备标识,或者第一目标LUN设备对应的LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区或者所述第一目标LUN设备中。receiving the selection message sent by the terminal and carrying the determined partition and the partition ID and LUN device ID corresponding to the first target partition in the LUN device, or the LUN device ID corresponding to the first target LUN device, and converting the The data of the first partition to be backed up is backed up to the first target partition or the first target LUN device.

第二方面,提供了一种备份数据的装置,所述装置包括:In a second aspect, a device for backing up data is provided, the device comprising:

接收模块,用于接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;The receiving module is configured to receive a backup request sent by the terminal that carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up;

确定模块,用于根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;A determining module, configured to determine the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up;

发送模块,用于在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;The sending module is configured to, among the local partitions, determine a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query carrying a partition identifier and a LUN device identifier corresponding to the determined partition information;

备份模块,用于接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。The backup module is configured to receive a selection message sent by the terminal that carries the partition identifier and the LUN device identifier corresponding to the first target partition in the determined partitions, and back up the data of the first partition to be backed up to the selected partition. in the first target partition described above.

结合第二方面,在该第二方面的第一种可能实现方式中,所述发送模块,用于:With reference to the second aspect, in a first possible implementation manner of the second aspect, the sending module is configured to:

在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。In each local partition, determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition.

结合第二方面,在该第二方面的第二种可能实现方式中,所述发送模块,用于:With reference to the second aspect, in a second possible implementation manner of the second aspect, the sending module is configured to:

在本地的各分区中,确定未存储数据的分区;Among the local partitions, determine the partitions that do not store data;

确定所述未存储数据的分区中存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up among the partitions that do not store data, and sending a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition to the terminal.

结合第二方面,在该第二方面的第三种可能实现方式中,所述确定模块,还用于:With reference to the second aspect, in a third possible implementation manner of the second aspect, the determining module is further configured to:

确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Determine the start address and end address corresponding to each partition in each LUN device of the disk storage system in the disk.

结合第二方面,在该第二方面的第四种可能实现方式中,所述备份模块,还用于:With reference to the second aspect, in a fourth possible implementation manner of the second aspect, the backup module is further configured to:

当达到预设周期时,将预先设置的第二待备份分区的数据备份到第二目标分区中。When the preset period is reached, the preset data of the second partition to be backed up is backed up to the second target partition.

结合第二方面,在该第二方面的第五种可能实现方式中,所述备份模块,还用于:With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the backup module is further configured to:

当检测到所述第一待备份分区中的数据损坏时,将所述第一目标分区中的数据复制到所述第一待备份分区中。When it is detected that the data in the first partition to be backed up is damaged, the data in the first target partition is copied to the first partition to be backed up.

结合第二方面,在该第二方面的第六种可能实现方式中,所述发送模块,用于:With reference to the second aspect, in a sixth possible implementation manner of the second aspect, the sending module is configured to:

在本地的各分区和各LUN设备中,确定存储量大于或等于所述第一待备份分区的存储量的分区和LUN设备,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识,以及确定出的LUN设备对应的LUN设备标识的查询消息;In each local partition and each LUN device, determine the partition and LUN device whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal the partition ID and LUN device ID corresponding to the determined partition , and a query message of the LUN device ID corresponding to the determined LUN device;

所述备份模块,用于:The backup module is used for:

接收所述终端发送的携带有所述确定出的分区和LUN设备中的第一目标分区对应的分区标识和LUN设备标识,或者第一目标LUN设备对应的LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区或者第一目标LUN设备中。receiving the selection message sent by the terminal and carrying the determined partition and the partition ID and LUN device ID corresponding to the first target partition in the LUN device, or the LUN device ID corresponding to the first target LUN device, and converting the The data of the first partition to be backed up is backed up to the first target partition or the first target LUN device.

本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by the embodiments of the present invention are:

本发明实施例中,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中,这样,可以只对第一待备份分区中的数据进行备份,从而可以节约存储系统的存储资源。In the embodiment of the present invention, the disk storage system receives the backup request sent by the terminal and carries the partition ID and logical unit number LUN device ID corresponding to the first partition to be backed up, and the disk storage system according to the partition ID and LUN corresponding to the first partition to be backed up The device identifier determines the storage capacity of the first partition to be backed up, among the local partitions, determines the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and sends to the terminal the partition identification corresponding to the determined partition and the query message of the LUN device ID, receiving the selection message sent by the terminal and carrying the partition ID corresponding to the first target partition in the determined partitions and the LUN device ID, and backing up the data of the first partition to be backed up to the first target partition In this way, only the data in the first partition to be backed up can be backed up, thereby saving storage resources of the storage system.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是本发明实施例提供的一种备份数据的方法流程图;FIG. 1 is a flow chart of a method for backing up data provided by an embodiment of the present invention;

图2是本发明实施例提供的一种系统框架图;FIG. 2 is a system frame diagram provided by an embodiment of the present invention;

图3是本发明实施例提供的一种备份数据的装置结构示意图。Fig. 3 is a schematic structural diagram of an apparatus for backing up data provided by an embodiment of the present invention.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

实施例一Embodiment one

本发明实施例提供了一种备份数据的方法,如图1所示,该方法的处理流程可以包括如下的步骤:The embodiment of the present invention provides a method for backing up data, as shown in Figure 1, the processing flow of the method may include the following steps:

步骤101,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求。Step 101 , the disk storage system receives a backup request from a terminal that carries a partition identifier and a logical unit number (LUN) device identifier corresponding to the first partition to be backed up.

步骤102,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量。Step 102, the disk storage system determines the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up.

步骤103,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Step 103, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send a query message carrying the partition ID and LUN device ID corresponding to the determined partition to the terminal.

步骤104,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中。Step 104, receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first target partition.

本发明实施例中,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中,这样,可以只对第一待备份分区中的数据进行备份,从而可以节约存储系统的存储资源。In the embodiment of the present invention, the disk storage system receives the backup request sent by the terminal and carries the partition ID and logical unit number LUN device ID corresponding to the first partition to be backed up, and the disk storage system according to the partition ID and LUN corresponding to the first partition to be backed up The device identifier determines the storage capacity of the first partition to be backed up, among the local partitions, determines the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and sends to the terminal the partition identification corresponding to the determined partition and the query message of the LUN device ID, receiving the selection message sent by the terminal and carrying the partition ID corresponding to the first target partition in the determined partitions and the LUN device ID, and backing up the data of the first partition to be backed up to the first target partition In this way, only the data in the first partition to be backed up can be backed up, thereby saving storage resources of the storage system.

实施例二Embodiment two

本发明实施例提供了一种备份数据的方法,该方法的执行主体为服务器。其中,服务器可以是磁盘存储系统的服务器。如图2所示,为本发明实施例的系统框架图,其中包括磁盘存储系统和终端。The embodiment of the present invention provides a method for backing up data, and the execution body of the method is a server. Wherein, the server may be a server of a disk storage system. As shown in FIG. 2, it is a system frame diagram of the embodiment of the present invention, which includes a disk storage system and a terminal.

下面将结合具体实施方式,对图1所示的处理流程进行详细的说明,内容可以如下:The processing flow shown in FIG. 1 will be described in detail below in conjunction with specific implementation methods, and the content may be as follows:

步骤101,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求。Step 101 , the disk storage system receives a backup request from a terminal that carries a partition identifier and a logical unit number (LUN) device identifier corresponding to the first partition to be backed up.

在实施中,用户可以在终端安装用于管理磁盘存储系统的应用程序,用户可以通过该应用程序对终端在磁盘存储系统中对应的存储空间进行分区,也可以通过该应用程序对磁盘存储系统中的分区进行备份。当用户需要将终端在磁盘存储系统中的某分区(即第一待备份分区)进行备份时,可以在终端打开该应用程序,然后在该应用程序中选择该分区,终端则会接收到对应该分区的选择指令,然后向磁盘存储系统发送备份请求,该备份请求中携带有该分区对应的分区标识和LUN(LogicalUnitNumber,逻辑单元号)设备标识,磁盘存储系统则会接收到该备份请求,并对该备份请求进行解析,获取该备份请求中携带的该分区对应的分区标识和LUN设备标识。In the implementation, the user can install an application program for managing the disk storage system on the terminal, and the user can use this application program to partition the corresponding storage space of the terminal in the disk storage system, or use this application program to partition the storage space in the disk storage system. partition for backup. When the user needs to back up a partition of the terminal in the disk storage system (that is, the first partition to be backed up), he can open the application program on the terminal, and then select the partition in the application program, and the terminal will receive the corresponding Partition selection command, and then send a backup request to the disk storage system, the backup request carries the partition ID and LUN (LogicalUnitNumber, Logical Unit Number) device ID corresponding to the partition, the disk storage system will receive the backup request, and The backup request is parsed to obtain the partition identifier and LUN device identifier corresponding to the partition carried in the backup request.

可选的,可以先确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Optionally, the start address and end address corresponding to each partition in each LUN device of the disk storage system on the disk may be determined first.

在实施中,各LUN设备中预先存储有各分区的分区信息,分区信息可以包括各分区在磁盘存储系统中的磁盘中对应的起始地址、结束地址和分区的存储量中的两项或多项。各分区的分区标识及这些分区对应的分区信息可以以分区信息表的形式进行存储。当用户在终端打开用于管理磁盘存储系统的应用程序时,该应用程序可以向磁盘存储系统发送查询请求,磁盘存储系统则会接收到该查询请求,然后可以确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。磁盘存储系统中分区的分区格式可以是多样的,如分区格式可以为MBR(MasterBootRecord,主引导记录)分区格式和GPT(GloballyUniqueIdentifierPartitionTableFormat,全球唯一标识符分区格式)分区格式。磁盘存储系统可以先获取各LUN设备的分区格式,然后可以根据不同的分区格式以及该LUN设备的分区信息表,解析出各LUN设备中的各分区在磁盘中对应的起始地址和结束地址,然后将解析出的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址发送给终端,以便用户选择待备份分区。In the implementation, the partition information of each partition is pre-stored in each LUN device, and the partition information may include two or more of the corresponding start address, end address and storage capacity of each partition in the disk in the disk storage system. item. The partition identification of each partition and the partition information corresponding to these partitions may be stored in the form of a partition information table. When the user opens the application program for managing the disk storage system on the terminal, the application program can send a query request to the disk storage system, and the disk storage system will receive the query request, and then can determine the location of each LUN device in the disk storage system. The corresponding start address and end address of each partition in the disk. The partition format of the partition in the disk storage system can be various, such as the partition format can be MBR (MasterBootRecord, master boot record) partition format and GPT (GloballyUniqueIdentifierPartitionTableFormat, globally unique identifier partition format) partition format. The disk storage system can first obtain the partition format of each LUN device, and then analyze the corresponding start address and end address of each partition in each LUN device in the disk according to different partition formats and the partition information table of the LUN device. Then, the parsed start address and end address corresponding to each partition in each LUN device in the disk are sent to the terminal, so that the user can select the partition to be backed up.

例如,磁盘存储系统获取某LUN设备的分区的分区格式为MBR分区格式,则可以先判断该LUN设备上是否有分区,如果该LUN设备上存在分区,则磁盘存储系统可以进一步判断该LUN设备是否包括扩展分区。具体地,磁盘存储系统可以判断各分区信息表中04H位置的标识符是否为0x0F或者0x05,如果是,则说明该LUN设备包含扩展分区,然后可以获取扩展分区的分区格式,进而可以获取扩展分区的分区信息表,分区格式为MBR分区格式的分区中,分区信息表中存储有该LUN设备中所有分区的分区起始地址和分区的存储量,磁盘存储系统可以根据分区起始地址和分区的存储量,计算出各分区的结束地址,磁盘存储系统还可以对获取到的分区格式和分区信息进行存储,以便后续使用。另外,如果分区信息表中04H位置的标识符为0x0F和0x05以外的标识符,则说明该LUN设备中不存在扩展分区,然后可以进行上述计算处理。For example, if the disk storage system obtains the partition format of the partition of a LUN device as the MBR partition format, it can first determine whether there are partitions on the LUN device. If there are partitions on the LUN device, the disk storage system can further determine whether the LUN device has Including extended partitions. Specifically, the disk storage system can determine whether the identifier at position 04H in each partition information table is 0x0F or 0x05, if yes, it means that the LUN device contains an extended partition, and then the partition format of the extended partition can be obtained, and then the extended partition can be obtained In the partition information table of the partition format of the MBR partition format, the partition information table stores the partition start addresses and partition storage capacity of all partitions in the LUN device. The disk storage system can The storage capacity is calculated by calculating the end address of each partition, and the disk storage system can also store the obtained partition format and partition information for subsequent use. In addition, if the identifier at position 04H in the partition information table is an identifier other than 0x0F and 0x05, it means that there is no extended partition in the LUN device, and then the above calculation process can be performed.

又如,磁盘存储系统获取某LUN设备的分区的分区格式为GPT分区格式,分区格式为GPT分区格式的分区中,分区信息表中存储有该LUN设备中所有分区的起始地址和结束地址,磁盘存储系统获取各分区的起始地址和结束地址,然后进行存储,以便后续使用。For another example, the disk storage system obtains the partition format of the partition of a LUN device in the GPT partition format, and in the partition format of the GPT partition format, the partition information table stores the start addresses and end addresses of all partitions in the LUN device. The disk storage system obtains the start address and end address of each partition, and then stores them for subsequent use.

步骤102,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量。Step 102, the disk storage system determines the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up.

在实施中,磁盘存储系统获取到备份请求中的第一待备份分区对应的分区标识和LUN设备标识后,可以根据第一待备份分区对应的LUN设备标识,确定第一待备份分区对应的LUN设备,进而可以根据第一待备份分区对应的分区标识,在该LUN设备的分区信息表中进行查询,确定第一待备份分区对应的起始地址和结束地址,进而可以确定第一待备份分区的存储量。In implementation, after the disk storage system obtains the partition identifier and LUN device identifier corresponding to the first partition to be backed up in the backup request, it can determine the LUN corresponding to the first partition to be backed up according to the LUN device identifier corresponding to the first partition to be backed up device, and then according to the partition identifier corresponding to the first partition to be backed up, query in the partition information table of the LUN device to determine the start address and end address corresponding to the first partition to be backed up, and then determine the first partition to be backed up storage capacity.

步骤103,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Step 103, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send a query message carrying the partition ID and LUN device ID corresponding to the determined partition to the terminal.

在实施中,磁盘存储系统确定第一待备份分区的存储量后,可以在本地的各分区中进行查询,确定存储量大于或等于第一待备份分区的存储量的分区,进而可以获取这些分区对应的分区标识和LUN设备标识,然后可以向终端发送查询消息,查询消息中携带有这些分区对应的分区标识和LUN设备标识,终端则会接收到该查询消息,然后可以对该查询消息进解析,获取该查询消息中的分区对应的分区标识和LUN设备标识,并对获取到的分区标识和LUN设备标识进行显示,用户可以根据自身的需要选择分区(即第一目标分区),终端则会接收到对应该分区的选择指令,然后向磁盘存储系统发送选择消息,该选择消息中携带有第一目标分区对应的分区标识和LUN设备标识。另外,磁盘存储系统还可以确定与自身建立业务关系的其他存储系统中,存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有这些分区对应的分区标识和LUN设备标识的查询消息。用户可以根据自身的需要选择本存储系统中的其他分区或者LUN设备作为第一目标分区,也可以选择其他存储系统上的分区和LUN设备作为第一目标分区。In implementation, after the disk storage system determines the storage capacity of the first partition to be backed up, it can query the local partitions to determine the partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and then obtain these partitions Corresponding partition IDs and LUN device IDs, and then you can send query messages to the terminal, the query messages carry the partition IDs and LUN device IDs corresponding to these partitions, the terminal will receive the query message, and then you can analyze the query message , obtain the partition ID and LUN device ID corresponding to the partition in the query message, and display the obtained partition ID and LUN device ID. The user can select a partition (that is, the first target partition) according to his own needs, and the terminal will After receiving the selection instruction corresponding to the partition, a selection message is sent to the disk storage system, and the selection message carries the partition identifier and the LUN device identifier corresponding to the first target partition. In addition, the disk storage system can also determine the partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up in other storage systems with which it has established a business relationship, and send to the terminal carrying the partition identifiers and LUN device identifiers corresponding to these partitions query message. Users can select other partitions or LUN devices in the storage system as the first target partition according to their own needs, or select partitions and LUN devices on other storage systems as the first target partition.

可选的,可以确定存储量大于或等于第一待备份分区的存储量的所有分区,相应的,步骤103的处理过程可以如下:在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Optionally, it is possible to determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up. Correspondingly, the processing procedure of step 103 may be as follows: All the partitions with the storage capacity of the backup partitions are sent to the terminal with a query message carrying the partition identifier and the LUN device identifier corresponding to the determined partition.

在实施中,磁盘存储系统可以在本地的各分区中进行查询,确定存储量大于或等于第一待备份分区的存储量的所有分区,进而可以获取这些分区对应的分区标识和LUN设备标识,然后可以向终端发送查询消息,查询消息中携带有这些分区对应的分区标识和LUN设备标识。In implementation, the disk storage system can query in each local partition to determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and then can obtain the partition ID and LUN device ID corresponding to these partitions, and then A query message may be sent to the terminal, and the query message carries the partition identifiers and LUN device identifiers corresponding to these partitions.

可选的,可以确定未存储数据且存储量大于或等于第一待备份分区的存储量的分区,相应的,步骤103的处理过程可以如下:在本地的各分区中,确定未存储数据的分区;确定未存储数据的分区中存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Optionally, it is possible to determine partitions that have no data stored and whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up. Correspondingly, the process of step 103 may be as follows: among the local partitions, determine the partitions that do not store data ; Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up in the partitions that do not store data, and sending to the terminal a query message that carries the partition identifier and the LUN device identifier corresponding to the determined partition.

在实施中,磁盘存储系统可以在本地的各分区中进行查询,确定未存储数据的分区,进而可以在未存储数据的分区中,确定存储量大于或等于第一待备份分区的存储量的分区,然后可以获取这些分区对应的分区标识和LUN设备标识,向终端发送查询消息,查询消息中携带有上述确定出的分区对应的分区标识和LUN设备标识。In implementation, the disk storage system can perform queries in each local partition to determine the partitions that do not store data, and then, among the partitions that do not store data, determine the partitions that have a storage capacity greater than or equal to the storage capacity of the first partition to be backed up , and then acquire the partition identifiers and LUN device identifiers corresponding to these partitions, and send a query message to the terminal, where the query message carries the partition identifiers and LUN device identifiers corresponding to the partitions determined above.

可选的,可以确定存储量大于或等于第一待备份分区的存储量的分区和LUN设备,相应的,步骤103的处理过程可以如下:在本地的各分区和各LUN设备中,确定存储量大于或等于第一待备份分区的存储量的分区或LUN设备,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识,以及确定出的LUN设备对应的LUN设备标识的查询消息。Optionally, partitions and LUN devices whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up may be determined. Correspondingly, the processing procedure of step 103 may be as follows: in each local partition and each LUN device, determine the storage capacity A partition or a LUN device that is greater than or equal to the storage capacity of the first partition to be backed up sends to the terminal a query message that carries the partition identifier and the LUN device identifier corresponding to the determined partition, and the LUN device identifier corresponding to the determined LUN device.

在实施中,磁盘存储系统确定第一待备份分区的存储量后,可以在本地的各分区中进行查询存储量大于或等于第一待备份分区的存储量的分区或LUN设备,进而可以获取查询到的分区对应的分区标识和LUN设备标识,以及查询到的LUN设备对应的LUN设备标识,然后可以向终端发送查询消息,查询消息中携带有查询到的分区对应的分区标识和LUN设备标识,以及查询到的LUN设备对应的LUN设备标识。In implementation, after the disk storage system determines the storage capacity of the first partition to be backed up, it can query the partitions or LUN devices whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up in each local partition, and then can obtain the query The partition ID and LUN device ID corresponding to the obtained partition, and the LUN device ID corresponding to the queried LUN device, and then a query message can be sent to the terminal, and the query message carries the partition ID and LUN device ID corresponding to the queried partition, And the LUN device ID corresponding to the queried LUN device.

步骤104,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中。Step 104, receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first target partition.

在实施中,磁盘存储系统接收到终端发送的选择消息后,可以对该选择消息进行解析,获取该选择消息中的第一目标分区对应的分区标识和LUN设备标识,然后可以通过第一目标分区对应的LUN设备标识,确定第一目标分区所属的LUN设备,进而可以根据第一目标分区对应的分区标识,在该LUN设备的分区信息标识,查询第一目标分区对应的起始地址和结束地址,即可以确定第一目标分区在磁盘存储系统中的磁盘中对应的位置。磁盘存储系统还可以根据上述获取到的第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区在磁盘存储系统中的磁盘中对应的位置,然后磁盘存储系统可以将上述第一待备份分区中的数据备份到第一目标分区中。进行备份的方法可以是多种多样的,可以采用现有LUN设备备份技术的任何一种,如对LUN的全量拷贝、增量拷贝、分裂镜像、同步远程复制、异步远程复制等。In implementation, after the disk storage system receives the selection message sent by the terminal, it can parse the selection message to obtain the partition ID and LUN device ID corresponding to the first target partition in the selection message, and then can pass the first target partition The corresponding LUN device ID determines the LUN device to which the first target partition belongs, and then you can query the start address and end address corresponding to the first target partition in the partition information ID of the LUN device according to the partition ID corresponding to the first target partition , that is, the corresponding position of the first target partition on the disk in the disk storage system can be determined. The disk storage system can also determine the corresponding position of the first partition to be backed up in the disk in the disk storage system according to the obtained partition ID and LUN device ID corresponding to the first partition to be backed up, and then the disk storage system can save the above-mentioned second The data in the partition to be backed up is backed up to the first target partition. There are various backup methods, and any of the existing LUN device backup technologies can be used, such as full copy, incremental copy, split mirror, synchronous remote copy, and asynchronous remote copy of the LUN.

另外,对于上述磁盘存储系统判断某LUN设备上是否存在分区的情况,如果磁盘存储系统经过判断后,确定某LUN设备上未存在分区,则磁盘存储系统可以以LUN为对象对该LUN进行数据备份。In addition, for the above-mentioned situation where the disk storage system judges whether there is a partition on a certain LUN device, if the disk storage system determines that there is no partition on a certain LUN device after the judgment, the disk storage system can use the LUN as an object to perform data backup on the LUN .

可选的,对于上述确定存储量大于或等于第一待备份分区的存储量的分区和LUN设备的情况,相应的,步骤104的处理过程可以如下:接收终端发送的携带有确定出的分区和LUN设备中的第一目标分区对应的分区标识和LUN设备标识,或者第一目标LUN设备对应的LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区或者第一目标LUN设备中。Optionally, for the above-mentioned situation of partitions and LUN devices whose storage capacity is determined to be greater than or equal to the storage capacity of the first partition to be backed up, correspondingly, the processing procedure of step 104 may be as follows: the receiving terminal carries the determined partition and The partition ID and LUN device ID corresponding to the first target partition in the LUN device, or the selection message of the LUN device ID corresponding to the first target LUN device, back up the data of the first partition to be backed up to the first target partition or the first target In the LUN device.

在实施中,磁盘存储系统接收到终端发送的选择消息后,可以对该选择消息进行解析,获取该选择消息中携带的信息,如果磁盘存储系统获取到的信息为第一目标分区对应的分区标识和LUN设备标识,则可以按照上述处理方法进行处理,如果磁盘存储系统获取到的信息为第一目标LUN设备对应的LUN设备标识,则可以确定该LUN设备标识对应的LUN设备(即第一目标LUN设备)。如果该LUN设备中未存在分区,则将上述第一待备份分区中的数据备份到该LUN设备中;如果该LUN设备中存在分区,则取消LUN设备中的分区,该将上述第一待备份分区中的数据备份到该LUN设备中。In implementation, after the disk storage system receives the selection message sent by the terminal, it can analyze the selection message to obtain the information carried in the selection message. If the information obtained by the disk storage system is the partition identifier corresponding to the first target partition and the LUN device ID, it can be processed according to the above processing method. If the information obtained by the disk storage system is the LUN device ID corresponding to the first target LUN device, then the LUN device corresponding to the LUN device ID (that is, the first target LUN device) can be determined. LUN device). If there is no partition in the LUN device, back up the data in the above-mentioned first partition to be backed up to the LUN device; if there is a partition in the LUN device, cancel the partition in the LUN device, and the above-mentioned first backup partition The data in the partition is backed up to the LUN device.

可选的,当达到预设周期时,可以将预先设置的第二待备份分区的数据备份到第二目标分区中。Optionally, when the preset period is reached, the preset data of the second partition to be backed up may be backed up to the second target partition.

在实施中,磁盘存储系统中可以预先设置备份的预设周期,当达到预设周期时,磁盘存储系统可以自动的对某待备份分区(即第二待备份分区)的数据进行备份,即通过上述备份方法将该分区的数据备份到其他分区(即第二目标分区)中。这样,可以及时的对已存储的数据进行备份及保存,即使保存该数据的分区(即第二待备份分区)受到损坏时,其他的分区仍可以保存有完整的数据。In implementation, the preset period of backup can be preset in the disk storage system, and when the preset period is reached, the disk storage system can automatically back up the data of a partition to be backed up (ie, the second partition to be backed up), that is, through The above backup method backs up the data of the partition to another partition (that is, the second target partition). In this way, the stored data can be backed up and saved in time, and even if the partition storing the data (that is, the second partition to be backed up) is damaged, other partitions can still save complete data.

可选的,将第一待备份分区的数据备份到第一目标分区中之后,可以将第一目标分区中的数据复制到第一待备份分区中,相应的处理过程可以如下:当检测到第一待备份分区中的数据损坏时,将第一目标分区中的数据复制到第一待备份分区中。Optionally, after backing up the data of the first partition to be backed up to the first target partition, the data in the first target partition can be copied to the first partition to be backed up, and the corresponding processing can be as follows: When the data in the partition to be backed up is damaged, the data in the first target partition is copied to the first partition to be backed up.

在实施中,磁盘存储系统可以对以存储数据的分区进行检测,如果检测到第一待备份分区中的数据受到损坏,则可以确定该第一待备份分区对应的第一目标分区,然后可以将第一目标分区中的数据复制到第一待备份分区中,以修复第一待备份分区中的数据。In implementation, the disk storage system can detect the partitions used to store data, and if it detects that the data in the first partition to be backed up is damaged, it can determine the first target partition corresponding to the first partition to be backed up, and then the The data in the first target partition is copied to the first partition to be backed up, so as to restore the data in the first partition to be backed up.

本发明实施例中,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中,这样,可以只对第一待备份分区中的数据进行备份,从而可以节约存储系统的存储资源。In the embodiment of the present invention, the disk storage system receives the backup request sent by the terminal and carries the partition ID and logical unit number LUN device ID corresponding to the first partition to be backed up, and the disk storage system according to the partition ID and LUN corresponding to the first partition to be backed up The device identifier determines the storage capacity of the first partition to be backed up, among the local partitions, determines the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and sends to the terminal the partition identification corresponding to the determined partition and the query message of the LUN device ID, receiving the selection message sent by the terminal and carrying the partition ID corresponding to the first target partition in the determined partitions and the LUN device ID, and backing up the data of the first partition to be backed up to the first target partition In this way, only data in the first partition to be backed up can be backed up, thereby saving storage resources of the storage system.

实施例三Embodiment Three

基于相同的技术构思,本发明实施例还提供了一种备份数据的装置,如图3所示,该装置包括:Based on the same technical concept, the embodiment of the present invention also provides a device for backing up data, as shown in Figure 3, the device includes:

接收模块310,用于接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;The receiving module 310 is configured to receive the backup request sent by the terminal and carrying the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up;

确定模块320,用于根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;A determining module 320, configured to determine the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up;

发送模块330,用于在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;The sending module 330 is configured to, among the local partitions, determine a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a message carrying the partition identifier and the LUN device identifier corresponding to the determined partition Query message;

备份模块340,用于接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。The backup module 340 is configured to receive a selection message sent by the terminal that carries the partition identifier and the LUN device identifier corresponding to the first target partition in the determined partitions, and back up the data of the first partition to be backed up to in the first target partition.

可选的,所述发送模块330,用于:Optionally, the sending module 330 is configured to:

在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。In each local partition, determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition.

可选的,所述发送模块330,用于:Optionally, the sending module 330 is configured to:

在本地的各分区中,确定未存储数据的分区;Among the local partitions, determine the partitions that do not store data;

确定所述未存储数据的分区中存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up among the partitions that do not store data, and sending a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition to the terminal.

可选的,所述确定模块320,还用于:Optionally, the determining module 320 is further configured to:

确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Determine the start address and end address corresponding to each partition in each LUN device of the disk storage system in the disk.

可选的,所述备份模块340,还用于:Optionally, the backup module 340 is also used for:

当达到预设周期时,将预先设置的第二待备份分区的数据备份到第二目标分区中。When the preset period is reached, the preset data of the second partition to be backed up is backed up to the second target partition.

可选的,所述备份模块340,还用于:Optionally, the backup module 340 is also used for:

当检测到所述第一待备份分区中的数据损坏时,将所述第一目标分区中的数据复制到所述第一待备份分区中。When it is detected that the data in the first partition to be backed up is damaged, the data in the first target partition is copied to the first partition to be backed up.

本发明实施例中,磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求,磁盘存储系统根据第一待备份分区对应的分区标识和LUN设备标识,确定第一待备份分区的存储量,在本地的各分区中,确定存储量大于或等于第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,接收终端发送的携带有确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将第一待备份分区的数据备份到第一目标分区中,这样,可以只对第一待备份分区中的数据进行备份,从而可以节约存储系统的存储资源。In the embodiment of the present invention, the disk storage system receives the backup request sent by the terminal and carries the partition ID and logical unit number LUN device ID corresponding to the first partition to be backed up, and the disk storage system according to the partition ID and LUN corresponding to the first partition to be backed up The device identifier determines the storage capacity of the first partition to be backed up, among the local partitions, determines the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and sends to the terminal the partition identification corresponding to the determined partition and the query message of the LUN device ID, receiving the selection message sent by the terminal and carrying the partition ID corresponding to the first target partition in the determined partitions and the LUN device ID, and backing up the data of the first partition to be backed up to the first target partition In this way, only data in the first partition to be backed up can be backed up, thereby saving storage resources of the storage system.

需要说明的是:上述实施例提供的备份数据的装置在备份数据时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的备份数据的装置与备份数据的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the device for backing up data provided by the above-mentioned embodiment only uses the division of the above-mentioned functional modules as an example when backing up data. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for backing up data provided by the above embodiment and the method embodiment for backing up data belong to the same idea, and its specific implementation process is detailed in the method embodiment, and will not be repeated here.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (14)

Translated fromChinese
1.一种备份数据的方法,其特征在于,所述方法包括:1. A method for backing up data, characterized in that the method comprises:磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;The disk storage system receives the backup request sent by the terminal and carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up;磁盘存储系统根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;The disk storage system determines the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up;在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;In each local partition, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying the partition identifier and the LUN device identifier corresponding to the determined partition;接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first target partition middle.2.根据权利要求1所述的方法,其特征在于,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:2. The method according to claim 1, characterized in that, among the local partitions, the partition whose storage capacity is determined to be greater than or equal to the storage capacity of the first partition to be backed up is sent to the terminal carrying the determined The query message of the partition ID and LUN device ID corresponding to the partition, including:在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。In each local partition, determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition.3.根据权利要求1所述的方法,其特征在于,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:3. The method according to claim 1, characterized in that, among the local partitions, determine the partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the determined The query message of the partition ID and LUN device ID corresponding to the partition, including:在本地的各分区中,确定未存储数据的分区;Among the local partitions, determine the partitions that do not store data;确定所述未存储数据的分区中存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up among the partitions that do not store data, and sending a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition to the terminal.4.根据权利要求1所述的方法,其特征在于,所述磁盘存储系统接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求之前,所述方法还包括:4. The method according to claim 1, wherein before the disk storage system receives the backup request sent by the terminal and carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up, the method Also includes:确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Determine the start address and end address corresponding to each partition in each LUN device of the disk storage system in the disk.5.根据权利要求1所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1, characterized in that the method further comprises:当达到预设周期时,将预先设置的第二待备份分区的数据备份到第二目标分区中。When the preset period is reached, the preset data of the second partition to be backed up is backed up to the second target partition.6.根据权利要求1所述的方法,其特征在于,所述将所述第一待备份分区的数据备份到所述第一目标分区中之后,所述方法还包括:6. The method according to claim 1, wherein after backing up the data of the first partition to be backed up to the first target partition, the method further comprises:当检测到所述第一待备份分区中的数据损坏时,将所述第一目标分区中的数据复制到所述待备份分区中。When it is detected that the data in the first partition to be backed up is damaged, the data in the first target partition is copied to the partition to be backed up.7.根据权利要求1所述的方法,其特征在于,所述在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息,包括:7. The method according to claim 1, characterized in that, among the local partitions, the partition whose storage capacity is determined to be greater than or equal to the storage capacity of the first partition to be backed up is sent to the terminal carrying the determined The query message of the partition ID and LUN device ID corresponding to the partition, including:在本地的各分区和各LUN设备中,确定存储量大于或等于所述第一待备份分区的存储量的分区或LUN设备,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识,以及确定出的LUN设备对应的LUN设备标识的查询消息;Among the local partitions and LUN devices, determine the partition or LUN device whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send the partition ID and LUN device ID corresponding to the determined partition to the terminal , and a query message of the LUN device ID corresponding to the determined LUN device;所述接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中,包括:receiving the selection message sent by the terminal and carrying the partition identifier and LUN device identifier corresponding to the first target partition in the determined partitions, and backing up the data of the first partition to be backed up to the first In the target partition, include:接收所述终端发送的携带有所述确定出的分区和LUN设备中的第一目标分区对应的分区标识和LUN设备标识,或者第一目标LUN设备对应的LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区或者所述第一目标LUN设备中。receiving the selection message sent by the terminal and carrying the determined partition and the partition ID and LUN device ID corresponding to the first target partition in the LUN device, or the LUN device ID corresponding to the first target LUN device, and converting the The data of the first partition to be backed up is backed up to the first target partition or the first target LUN device.8.一种备份数据的装置,其特征在于,所述装置包括:8. A device for backing up data, characterized in that the device comprises:接收模块,用于接收终端发送的携带有第一待备份分区对应的分区标识和逻辑单元号LUN设备标识的备份请求;The receiving module is configured to receive a backup request sent by the terminal that carries the partition identifier and logical unit number LUN device identifier corresponding to the first partition to be backed up;确定模块,用于根据所述第一待备份分区对应的分区标识和LUN设备标识,确定所述第一待备份分区的存储量;A determining module, configured to determine the storage capacity of the first partition to be backed up according to the partition identifier and the LUN device identifier corresponding to the first partition to be backed up;发送模块,用于在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息;The sending module is configured to, among the local partitions, determine a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query carrying a partition identifier and a LUN device identifier corresponding to the determined partition information;备份模块,用于接收所述终端发送的携带有所述确定出的分区中的第一目标分区对应的分区标识和LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区中。The backup module is configured to receive a selection message sent by the terminal that carries the partition identifier and the LUN device identifier corresponding to the first target partition in the determined partitions, and back up the data of the first partition to be backed up to the selected partition. in the first target partition described above.9.根据权利要求8所述的装置,其特征在于,所述发送模块,用于:9. The device according to claim 8, wherein the sending module is configured to:在本地的各分区中,确定存储量大于或等于所述第一待备份分区的存储量的所有分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。In each local partition, determine all partitions whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition.10.根据权利要求8所述的装置,其特征在于,所述发送模块,用于:10. The device according to claim 8, wherein the sending module is configured to:在本地的各分区中,确定未存储数据的分区;Among the local partitions, determine the partitions that do not store data;确定所述未存储数据的分区中存储量大于或等于所述第一待备份分区的存储量的分区,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识的查询消息。Determining a partition whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up among the partitions that do not store data, and sending a query message carrying a partition identifier and a LUN device identifier corresponding to the determined partition to the terminal.11.根据权利要求8所述的装置,其特征在于,所述确定模块,还用于:11. The device according to claim 8, wherein the determining module is further configured to:确定磁盘存储系统的各LUN设备中的各分区在磁盘中对应的起始地址和结束地址。Determine the start address and end address corresponding to each partition in each LUN device of the disk storage system in the disk.12.根据权利要求8所述的装置,其特征在于,所述备份模块,还用于:12. The device according to claim 8, wherein the backup module is also used for:当达到预设周期时,将预先设置的第二待备份分区的数据备份到第二目标分区中。When the preset period is reached, the preset data of the second partition to be backed up is backed up to the second target partition.13.根据权利要求8所述的装置,其特征在于,所述备份模块,还用于:13. The device according to claim 8, wherein the backup module is also used for:当检测到所述第一待备份分区中的数据损坏时,将所述第一目标分区中的数据复制到所述第一待备份分区中。When it is detected that the data in the first partition to be backed up is damaged, the data in the first target partition is copied to the first partition to be backed up.14.根据权利要求8所述的方法,其特征在于,所述发送模块,用于:14. The method according to claim 8, wherein the sending module is configured to:在本地的各分区和各LUN设备中,确定存储量大于或等于所述第一待备份分区的存储量的分区和LUN设备,向终端发送携带有确定出的分区对应的分区标识和LUN设备标识,以及确定出的LUN设备对应的LUN设备标识的查询消息;In each local partition and each LUN device, determine the partition and LUN device whose storage capacity is greater than or equal to the storage capacity of the first partition to be backed up, and send to the terminal the partition ID and LUN device ID corresponding to the determined partition , and a query message of the identified LUN device ID corresponding to the determined LUN device;所述备份模块,用于:The backup module is used for:接收所述终端发送的携带有所述确定出的分区和LUN设备中的第一目标分区对应的分区标识和LUN设备标识,或者第一目标LUN设备对应的LUN设备标识的选择消息,将所述第一待备份分区的数据备份到所述第一目标分区或者第一目标LUN设备中。receiving the selection message sent by the terminal and carrying the determined partition and the partition ID and LUN device ID corresponding to the first target partition in the LUN device, or the LUN device ID corresponding to the first target LUN device, and converting the The data of the first partition to be backed up is backed up to the first target partition or the first target LUN device.
CN201410779452.4A2014-12-152014-12-15 A method and device for backing up dataActiveCN105760251B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201410779452.4ACN105760251B (en)2014-12-152014-12-15 A method and device for backing up data

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201410779452.4ACN105760251B (en)2014-12-152014-12-15 A method and device for backing up data

Publications (2)

Publication NumberPublication Date
CN105760251Atrue CN105760251A (en)2016-07-13
CN105760251B CN105760251B (en)2019-04-19

Family

ID=56336817

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201410779452.4AActiveCN105760251B (en)2014-12-152014-12-15 A method and device for backing up data

Country Status (1)

CountryLink
CN (1)CN105760251B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108733509A (en)*2017-04-172018-11-02伊姆西Ip控股有限责任公司 Method and system for backing up and restoring data in a cluster system
CN108984335A (en)*2017-06-022018-12-11伊姆西Ip控股有限责任公司 Method and system for backing up and restoring data
CN110389857A (en)*2018-04-202019-10-29伊姆西Ip控股有限责任公司Method, equipment and the computer program product of data backup
CN111930566A (en)*2020-07-282020-11-13友谊时光科技股份有限公司Data backup method and device, electronic equipment and storage medium
CN112925673A (en)*2021-02-182021-06-08北京九贺科技有限公司Big data storage management method and system for power monitoring

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101436152A (en)*2008-12-022009-05-20成都市华为赛门铁克科技有限公司Method and device for data backup
CN102929748A (en)*2012-11-082013-02-13华为技术有限公司Method and device for data backup
CN103559091A (en)*2013-11-122014-02-05宇龙计算机通信科技(深圳)有限公司Data scheduling method and split type terminal system
US20140279913A1 (en)*2013-03-152014-09-18Geoffrey Ray WehrmanFile system replication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101436152A (en)*2008-12-022009-05-20成都市华为赛门铁克科技有限公司Method and device for data backup
CN102929748A (en)*2012-11-082013-02-13华为技术有限公司Method and device for data backup
US20140279913A1 (en)*2013-03-152014-09-18Geoffrey Ray WehrmanFile system replication
CN103559091A (en)*2013-11-122014-02-05宇龙计算机通信科技(深圳)有限公司Data scheduling method and split type terminal system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108733509A (en)*2017-04-172018-11-02伊姆西Ip控股有限责任公司 Method and system for backing up and restoring data in a cluster system
CN108733509B (en)*2017-04-172021-12-10伊姆西Ip控股有限责任公司Method and system for backing up and restoring data in cluster system
CN108984335A (en)*2017-06-022018-12-11伊姆西Ip控股有限责任公司 Method and system for backing up and restoring data
CN108984335B (en)*2017-06-022022-04-29伊姆西Ip控股有限责任公司 Method and system for backing up and restoring data
US11489917B2 (en)2017-06-022022-11-01EMC IP Holding Company LLCMethod and system for backing up and restoring data
CN110389857A (en)*2018-04-202019-10-29伊姆西Ip控股有限责任公司Method, equipment and the computer program product of data backup
CN111930566A (en)*2020-07-282020-11-13友谊时光科技股份有限公司Data backup method and device, electronic equipment and storage medium
CN112925673A (en)*2021-02-182021-06-08北京九贺科技有限公司Big data storage management method and system for power monitoring

Also Published As

Publication numberPublication date
CN105760251B (en)2019-04-19

Similar Documents

PublicationPublication DateTitle
US8738883B2 (en)Snapshot creation from block lists
US9569457B2 (en)Data processing method and apparatus for distributed systems
US10067692B2 (en)Method and apparatus for backing up and restoring cross-virtual machine application
EP2863310B1 (en)Data processing method and apparatus, and shared storage device
CN104376127B (en)A kind of data manipulation method and device
CN107544871A (en)A kind of disk backup method of virtue machine and device
US11880280B2 (en)Variable number and size of put operations for storage backup
CN107656937B (en)Method and device for realizing consistency of read-write data
CN105760251A (en) A method and device for backing up data
US9946609B2 (en)Managing multi-level backups into the cloud
WO2016107219A1 (en)Data recovery method and apparatus
CN102971698A (en)Snapshot data-processing method and system, storage system and snapshot agency
CN109753379B (en)Snapshot data backup and deletion method, device and system
US10803109B2 (en)Method and device for reading and writing video data in NAS device
US11157456B2 (en)Replication of data in a distributed file system using an arbiter
CN105634635A (en)Real-time clock (RTC) sharing method, device and system
CN102262589A (en)Application server for realizing copying of hard disc driver, and method
CN107623705B (en)Storage mode upgrading method, device and system based on video cloud storage system
CN109343928B (en)Virtual memory file redirection method and system for virtual machine in virtualization cluster
CN103049350B (en)The initial method of a kind of remote copy system mirrored volume synchronization and device
CN112527446A (en)Time zone synchronization method, equipment and terminal equipment
CN115757213A (en)Chip circuit, starting method of processor and server
CN110704249A (en)Method, device and system for ensuring application consistency
US20140068215A1 (en)Method and apparatus for accessing data in a data storage system
CN108206933A (en)A kind of video data acquisition methods and device based on video cloud storage system

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20220909

Address after:No.1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan, 611730

Patentee after:Chengdu Huawei Technologies Co.,Ltd.

Address before:518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before:HUAWEI TECHNOLOGIES Co.,Ltd.

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp