CN105159908A - Database cloning method and apparatus - Google Patents
Database cloning method and apparatus Download PDFInfo
- Publication number
- CN105159908A CN105159908A CN201510383273.3A CN201510383273A CN105159908A CN 105159908 A CN105159908 A CN 105159908A CN 201510383273 A CN201510383273 A CN 201510383273A CN 105159908 A CN105159908 A CN 105159908A
- Authority
- CN
- China
- Prior art keywords
- lun
- mirror image
- database
- backup
- target database
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a database cloning method and apparatus. The method comprises the following steps: performing mirroring on a logic unit number (LUN) of a target database to obtain a mirrored LUN containing a backup database, and modifying a state of the backup database to a backup state; disconnecting the mirrored LUN and modifying the state of the backup database to a normal state; and mapping the mirrored LUN to a target server and importing volume group (VG) information into the target server. According to the database cloning method and apparatus, the LUN of the target database is mirrored by utilizing an LUN mirroring function, so that quick cloning of the target database is realized, the cloning time can be shortened, and the storage space can be saved.
Description
Technical field
The present invention relates to field of computer technology, be specifically related to a kind of method and apparatus of clone data storehouse.
Background technology
In informationized society, the resource of management and use various information fully is effectively the precondition of carrying out scientific research and decision-making management.Database technology is the core of the various information systems such as management information system, the office automation system and decision support system (DSS), is the important technical of carrying out scientific research and decision-making management.Database be organize according to data structure, the warehouse of store and management data, the data in database are by numerous user is shared its information and set up.
In prior art, when user need clone data storehouse carry out New function test and pressure test time, first by DB Backup to tape pool, obtain Backup Data, then Backup Data returned to destination server from tape pool.When the data in the database of cloning are TB level, comparatively large to the demand of the storage space of tape pool, and Backup Data and recovery data all need a large amount of time, need to take a large amount of time resources and space resources, are difficult to the demand meeting user.
Such as, when cloning 10TB database, needing the tape pool of 5TB for store backup data, is 300MB/s by DB Backup to the message transmission rate of tape pool, needs 10 hours consuming time; The message transmission rate that Backup Data is returned to destination server by tape pool is 300MB/s, needs 10 hours consuming time.Pay environment and need 20 hours consuming time altogether, take the storage space of 5TB.
Summary of the invention
The invention provides a kind of method and apparatus of clone data storehouse, take a large amount of time resources and the defect of space resources to solve existing clone data storehouse method.
The invention provides a kind of method of clone data storehouse, comprise the following steps:
Mirror image is carried out to the logical unit number LUN at target database place, obtains the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of described backup database;
Disconnecting described mirror image LUN, is normal condition by the status modifier of described backup database;
Described mirror image LUN is mapped to destination server, in described destination server, imports volume group VG information.
Alternatively, the described logical unit number LUN to target database place carries out mirror image, obtains the mirror image LUN comprising backup database, is specially:
In the storage at described target database place, according to the size and number of the LUN at described target database place, divide storage space, and mirror image is carried out to the LUN at described target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database.
Alternatively, the size and number of described mirror image LUN is identical with the size and number of the LUN at described target database place respectively.
Alternatively, in described destination server, import VG information, be specially:
Described VG information is imported in the operating system of described destination server.
Alternatively, import VG information in described destination server after, also comprise:
Open the backup database in described mirror image LUN, or described backup database is returned to the point of the random time after mirror image.
Present invention also offers a kind of device of clone data storehouse, comprising:
Mirror module, for carrying out mirror image to the logical unit number LUN at target database place, obtains the mirror image LUN comprising backup database, and is Status of Backups by the status modifier of described backup database;
Arranging module, for disconnecting the described mirror image LUN that described mirror module obtains, is normal condition by the status modifier of described backup database;
Mapping block, maps to destination server for the described mirror image LUN obtained by described mirror module, imports volume group VG information in described destination server.
Alternatively, described mirror module, specifically in the storage at described target database place, according to the size and number of the LUN at described target database place, divide storage space, and mirror image is carried out to the LUN at described target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of described backup database.
Alternatively, the size and number of described mirror image LUN is identical with the size and number of the LUN at described target database place respectively.
Alternatively, described mapping block, maps to destination server specifically for the described mirror image LUN obtained by described mirror module, described VG information is imported in the operating system of described destination server.
Alternatively, described device, also comprises:
Operational module, for opening the backup database in described mirror image LUN that described mirror module obtains, or returns to the point of the random time after mirror image by described backup database.
The present invention utilizes LUN image feature, carries out mirror image to the LUN at target database place, thus realizes the quick clone to target database, can shorten clone-time, and save storage space.
Accompanying drawing explanation
Fig. 1 is the method flow diagram in a kind of clone data storehouse in the embodiment of the present invention;
Fig. 2 is the structure drawing of device in a kind of clone data storehouse in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
It should be noted that, if do not conflicted, each feature in the embodiment of the present invention and embodiment can be combined with each other, all within protection scope of the present invention.In addition, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
Embodiments provide a kind of method of clone data storehouse, as shown in Figure 1, comprise the following steps:
Step 101, carries out mirror image to the LUN (LogicalUnitNumber, logical unit number) at target database place, obtains the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of backup database.
Particularly, in the storage at target database place, according to the size and number of the LUN at target database place, divide storage space, and mirror image is carried out to the LUN at target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database, and be backup (backup) state by the status modifier of backup database.
Wherein, the size and number of mirror image LUN is identical with the size and number of the LUN at target database place respectively, target database is the database be cloned, and backup database is the database obtained after clone's target database, and the data in backup database are identical with the data in target database.
Step 102, disconnecting mirror image LUN, is normal condition by the status modifier of backup database.
Step 103, maps to destination server by mirror image LUN, imports VG (VolumeGroup, volume group) information in destination server.
Particularly, mirror image LUN can be mapped to destination server, and VG information is imported in the operating system of destination server.
Wherein, destination server is the server needing the data used in target database, and the information of the operating system of destination server is all identical with the information of target database place operating system, and this parameter comprises version, patch, parameter, user ID and group ID.
Step 104, opens the backup database in mirror image LUN, or backup database is returned to the point of the random time after mirror image.
The embodiment of the present invention utilizes LUN image feature, directly carries out mirror image at storage interface to the LUN at target database place, thus realizes the quick clone to target database, can shorten clone-time, and save storage space.
Such as, when cloning 10TB database, database place LUN is directly carried out online mirror image by storage, and message transmission rate is 400MB/s, needs 7.2 hours consuming time; In addition, adjustment database positioning, LUN break mirror image, mapping and import VG information, need 0.8 hour consuming time, therefore, pay environment and amount to and need 8 hours consuming time, than prior art save 12 little time, and without the need to extra storage space.
Based on the method in above-mentioned clone data storehouse, the embodiment of the present invention additionally provides a kind of device of clone data storehouse, as shown in Figure 2, comprising:
Mirror module 210, for carrying out mirror image to the logical unit number LUN at target database place, obtains the mirror image LUN comprising backup database, and is Status of Backups by the status modifier of described backup database;
Particularly, above-mentioned image module 210, specifically in the storage at described target database place, according to the size and number of the LUN at described target database place, divide storage space, and mirror image is carried out to the LUN at described target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of described backup database.
Wherein, the size and number of mirror image LUN is identical with the size and number of the LUN at target database place respectively, target database is the database be cloned, and backup database is the database obtained after clone's target database, and the data in backup database are identical with the data in target database.
Arranging module 220, for disconnecting the mirror image LUN that mirror module 210 obtains, is normal condition by the status modifier of backup database;
Mapping block 230, maps to destination server for the described mirror image LUN obtained by mirror module 210, imports volume group VG information in described destination server.
Particularly, above-mentioned mapping block 230, maps to destination server specifically for the mirror image LUN obtained by mirror module 210, described VG information is imported in the operating system of described destination server.
Wherein, destination server is the server needing the data used in target database, and the information of the operating system of destination server is all identical with the information of target database place operating system, and this parameter comprises version, patch, parameter, user ID and group ID.
Further, said apparatus, also comprises:
Operational module 240, for opening the backup database in mirror image LUN that mirror module 210 obtains, or returns to the point of the random time after mirror image by backup database.
The embodiment of the present invention utilizes LUN image feature, directly carries out mirror image at storage interface to the LUN at target database place, thus realizes the quick clone to target database, can shorten clone-time, and save storage space.
In conjunction with the software module that the step in the method that embodiment disclosed herein describes can directly use hardware, processor to perform, or the combination of the two is implemented.Software module can be placed in the storage medium of other form any known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.
Claims (10)
1. the method in clone data storehouse, is characterized in that, comprises the following steps:
Mirror image is carried out to the logical unit number LUN at target database place, obtains the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of described backup database;
Disconnecting described mirror image LUN, is normal condition by the status modifier of described backup database;
Described mirror image LUN is mapped to destination server, in described destination server, imports volume group VG information.
2. the method for claim 1, is characterized in that, the described logical unit number LUN to target database place carries out mirror image, obtains the mirror image LUN comprising backup database, is specially:
In the storage at described target database place, according to the size and number of the LUN at described target database place, divide storage space, and mirror image is carried out to the LUN at described target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database.
3. the method for claim 1, is characterized in that, the size and number of described mirror image LUN is identical with the size and number of the LUN at described target database place respectively.
4. the method for claim 1, is characterized in that, imports VG information, be specially in described destination server:
Described VG information is imported in the operating system of described destination server.
5. the method for claim 1, is characterized in that, after importing VG information, also comprises in described destination server:
Open the backup database in described mirror image LUN, or described backup database is returned to the point of the random time after mirror image.
6. the device in clone data storehouse, is characterized in that, comprising:
Mirror module, for carrying out mirror image to the logical unit number LUN at target database place, obtains the mirror image LUN comprising backup database, and is Status of Backups by the status modifier of described backup database;
Arranging module, for disconnecting the described mirror image LUN that described mirror module obtains, is normal condition by the status modifier of described backup database;
Mapping block, maps to destination server for the described mirror image LUN obtained by described mirror module, imports volume group VG information in described destination server.
7. device as claimed in claim 6, is characterized in that,
Described mirror module, specifically in the storage at described target database place, according to the size and number of the LUN at described target database place, divide storage space, and mirror image is carried out to the LUN at described target database place dividing on the storage space that obtains, obtain the mirror image LUN comprising backup database, and be Status of Backups by the status modifier of described backup database.
8. device as claimed in claim 6, it is characterized in that, the size and number of described mirror image LUN is identical with the size and number of the LUN at described target database place respectively.
9. device as claimed in claim 6, is characterized in that,
Described mapping block, maps to destination server specifically for the described mirror image LUN obtained by described mirror module, described VG information is imported in the operating system of described destination server.
10. device as claimed in claim 6, is characterized in that, also comprise:
Operational module, for opening the backup database in described mirror image LUN that described mirror module obtains, or returns to the point of the random time after mirror image by described backup database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510383273.3A CN105159908A (en) | 2015-07-02 | 2015-07-02 | Database cloning method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510383273.3A CN105159908A (en) | 2015-07-02 | 2015-07-02 | Database cloning method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105159908A true CN105159908A (en) | 2015-12-16 |
Family
ID=54800765
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510383273.3A Pending CN105159908A (en) | 2015-07-02 | 2015-07-02 | Database cloning method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105159908A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109753409A (en) * | 2018-12-20 | 2019-05-14 | 厦门科灿信息技术有限公司 | A kind of date storage method of monitoring system, device and equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6718447B2 (en) * | 2001-06-28 | 2004-04-06 | Hewlett-Packard Development Company, L.P. | Method and system for providing logically consistent logical unit backup snapshots within one or more data storage devices |
CN101266565A (en) * | 2008-04-18 | 2008-09-17 | 华为技术有限公司 | Data backup process and device |
CN101562761A (en) * | 2009-05-18 | 2009-10-21 | 杭州华三通信技术有限公司 | Method and system for backup storage in optical network |
CN102103629A (en) * | 2010-12-14 | 2011-06-22 | 西北工业大学 | Online data migration method |
CN103744625A (en) * | 2014-01-14 | 2014-04-23 | 浪潮电子信息产业股份有限公司 | Method for copying disk data in virtual application |
CN103942117A (en) * | 2013-01-21 | 2014-07-23 | 中国移动通信集团河南有限公司 | Data backup method, device and system |
CN104283959A (en) * | 2014-10-14 | 2015-01-14 | 国云科技股份有限公司 | Performance-grading-based storage mechanism suitable for cloud platform |
CN104375904A (en) * | 2014-10-30 | 2015-02-25 | 浪潮电子信息产业股份有限公司 | Disaster recovery backup method based on snapshot differentiation data transmission |
CN104461777A (en) * | 2014-11-26 | 2015-03-25 | 华为技术有限公司 | Data mirroring method in storage array and storage array |
-
2015
- 2015-07-02 CN CN201510383273.3A patent/CN105159908A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6718447B2 (en) * | 2001-06-28 | 2004-04-06 | Hewlett-Packard Development Company, L.P. | Method and system for providing logically consistent logical unit backup snapshots within one or more data storage devices |
CN101266565A (en) * | 2008-04-18 | 2008-09-17 | 华为技术有限公司 | Data backup process and device |
CN101562761A (en) * | 2009-05-18 | 2009-10-21 | 杭州华三通信技术有限公司 | Method and system for backup storage in optical network |
CN102103629A (en) * | 2010-12-14 | 2011-06-22 | 西北工业大学 | Online data migration method |
CN103942117A (en) * | 2013-01-21 | 2014-07-23 | 中国移动通信集团河南有限公司 | Data backup method, device and system |
CN103744625A (en) * | 2014-01-14 | 2014-04-23 | 浪潮电子信息产业股份有限公司 | Method for copying disk data in virtual application |
CN104283959A (en) * | 2014-10-14 | 2015-01-14 | 国云科技股份有限公司 | Performance-grading-based storage mechanism suitable for cloud platform |
CN104375904A (en) * | 2014-10-30 | 2015-02-25 | 浪潮电子信息产业股份有限公司 | Disaster recovery backup method based on snapshot differentiation data transmission |
CN104461777A (en) * | 2014-11-26 | 2015-03-25 | 华为技术有限公司 | Data mirroring method in storage array and storage array |
Non-Patent Citations (1)
Title |
---|
作者:无;: "VMware虚拟化架构存储LUN复制以及挂载镜像LUN的步骤", 《道客巴巴网站,HTTP://WWW.DOC88.COM/P-8909045568902.HTML》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109753409A (en) * | 2018-12-20 | 2019-05-14 | 厦门科灿信息技术有限公司 | A kind of date storage method of monitoring system, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230384963A1 (en) | Efficient Creation And Management Of Snapshots | |
CN106201338B (en) | Date storage method and device | |
US8578096B2 (en) | Policy for storing data objects in a multi-tier storage system | |
US20120291133A1 (en) | Security compliant data storage management | |
CN104182508B (en) | A kind of data processing method and data processing equipment | |
CN103034566B (en) | Method and device for restoring virtual machine | |
CN102096557B (en) | Capacity expansion method, device and system for independent redundant array of inexpensive disc (RAID) | |
CN105339903A (en) | Restoring a file system object | |
CN103019890A (en) | Block-level disk data protection system and method thereof | |
CN110096227A (en) | Date storage method, data processing method, device, electronic equipment and computer-readable medium | |
CN103034592B (en) | Data processing method and device | |
CN104158858A (en) | Method and system for accessing distributed cluster file system | |
CN107967122A (en) | A kind of method for writing data of block device, device and medium | |
CN106339387B (en) | Increase the method for data synchronization and device of server in a kind of data-base cluster newly | |
CN102982182A (en) | Data storage planning method and device | |
CN105404565B (en) | A kind of dual-active data guard method and device | |
CN105677252B (en) | Read method, data processing method and the associated storage device of data | |
US9798483B2 (en) | Object storage power consumption optimization | |
CN103430178A (en) | Method, apparatus and product of data updating | |
CN103581229A (en) | Distributed file system, file access method and client terminal | |
CN107451271A (en) | A kind of Hash table processing method, device, equipment and storage medium | |
CN106708445B (en) | Link selecting method and device | |
CN105260266A (en) | Snapshot volume writing method and dependent snapshot system | |
US20210232316A1 (en) | Throttling a point-in-time snapshot copy operation within a data consistency application | |
US10078570B2 (en) | Determining dynamic statistics based on key value patterns |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151216 |