CN112486633A - Virtual machine data backup method under cloud platform - Google Patents
Virtual machine data backup method under cloud platform Download PDFInfo
- Publication number
- CN112486633A CN112486633A CN202011426273.4A CN202011426273A CN112486633A CN 112486633 A CN112486633 A CN 112486633A CN 202011426273 A CN202011426273 A CN 202011426273A CN 112486633 A CN112486633 A CN 112486633A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- backup
- cloud platform
- ceph
- data
- 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
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000012423 maintenance Methods 0.000 abstract description 2
- 230000003993 interaction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1464—Management of the backup or restore process for networked environments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a virtual machine data backup method under a cloud platform, which comprises the following steps: the backup proxy service calls an Openstack cloud platform to obtain a virtual machine id and a virtual machine starting type, calls a ceph api interface to obtain a storage mirror image id corresponding to the virtual machine or a cloud hard disk on a ceph rear end, and calls the ceph api to perform snapshot operation on the storage mirror image; the data backup method can realize online data protection of the virtual machine started by the openstack mirror image and the virtual machine started by the cloud hard disk only through simple configuration, does not need to modify cloud platform parameters, provides a complete non-invasive openstack virtual machine protection scheme, improves the integral backup efficiency, and reduces the operation and maintenance cost.
Description
Technical Field
The invention relates to a virtual machine data backup method, in particular to a virtual machine data backup method under a cloud platform.
Background
With the more mature cloud computing technology, from large-scale national enterprises to medium-sized and small enterprises, more and more users choose to use virtual machines to replace traditional servers, and management work of virtual machines is supported through various cloud platforms. The cloud platform built based on the openstack open source architecture has the characteristics of simplicity in implementation, large-scale expansion, unified standard and the like, and is widely used in the deployment scene of domestic private clouds.
According to the virtual machine starting mode of the openstack, the openstack virtual machine can be divided into a virtual machine (hereinafter referred to as image virtual machine) started through a mirror image and a virtual machine (hereinafter referred to as volume virtual machine) started through a cloud hard disk. For the two different types of virtual machines, openstack itself also provides corresponding data backup schemes, such as a nova snapshot scheme for an image virtual machine and a circle-backup scheme for a volume virtual machine. However, both schemes have respective disadvantages, for example, the nova snapshot scheme does not support backup of an online virtual machine, the circular-backup scheme can only support backup of a single cloud disk and needs to modify configuration files of a cloud platform, and a complete non-intrusive virtual machine data backup method is lacking.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a virtual machine data backup method under a cloud platform, which is high in backup efficiency and low in equipment cost.
The technical scheme is as follows: the virtual machine data backup method under the cloud platform comprises the following steps:
(1) the backup proxy service calls an Openstack cloud platform to obtain a virtual machine id and a virtual machine starting type, calls a ceph api interface to obtain a storage mirror image id corresponding to the virtual machine or a cloud hard disk on the ceph rear end, and calls the ceph api to perform snapshot operation on the storage mirror image;
(2) and mounting the virtual storage on the backup server medium to a backup agent, creating a mounting point, and writing the data in the snapshot into the medium in the backup server aiming at the ceph storage mirror image snapshot.
Further, in step (1), a ceph client is pre-installed on the backup agent, and the specific step of installing the ceph client includes: the backup proxy machine accesses the storage network for ceph.
The ceph client is used for connecting the openstack cloud platform and storing the openstack cloud platform at the back end; a backup end user configures a ceph server end ip address, an authentication mode and an authentication key on a backup proxy server; and creating a configuration file, and writing the storage pool configuration consistent with the cloud platform in the configuration file.
In the step (1), according to the starting type and the configured cloud platform storage pool information, a ceph api interface is called to obtain a corresponding storage mirror image id of the virtual machine or the cloud hard disk on a ceph back end.
In the step (1), the backup proxy service calls an Openstack cloud platform to further obtain the specification of the virtual machine, disk mounting information and network information, and the backup proxy service is used for creating the virtual machine by the Openstack.
And (2) mounting the virtual storage to the backup agent from the backup server medium through the virtual block device.
In the step (2), the data in the snapshot is written into the medium in the backup server, and the metadata related to the backup file is saved.
In the step (1), the backup proxy service calls an API (application programming interface) of the Nova component of the Openstack cloud platform.
And (2) writing the data in the snapshot into a medium in the backup server through a bottom-layer streaming read-write interface.
The virtual machine data backup system under the cloud platform comprises a calling module and a mounting module,
the calling module is used for calling the Openstack cloud platform by the backup agent service to acquire a virtual machine id and a virtual machine starting type, calling a ceph api interface to acquire a corresponding storage mirror image id of the virtual machine or a cloud hard disk on a ceph rear end, and calling the ceph api to perform snapshot operation on the storage mirror image;
the mounting module is used for mounting the virtual storage on the backup server medium to the backup agent, creating a mounting point, and writing the data in the snapshot into the medium in the backup server aiming at the ceph storage mirror image snapshot.
Has the advantages that: compared with the prior art, the invention has the following remarkable advantages: the method and the system for backing up the data of the virtual machine under the cloud platform can realize the online data protection of the virtual machine started by the openstack mirror image and the virtual machine started by the cloud hard disk only through simple configuration, do not need to modify cloud platform parameters, provide a complete non-invasive openstack virtual machine protection scheme, improve the integral backup efficiency and reduce the operation and maintenance cost.
Drawings
Fig. 1 is a data backup method for an openstack virtual machine.
Detailed Description
The technical solution of the present invention is further illustrated by the following examples.
The virtual machine data backup system under the cloud platform comprises a calling module and a mounting module,
the calling module is used for calling the Openstack cloud platform by the backup agent service to acquire a virtual machine id and a virtual machine starting type, calling a ceph api interface to acquire a corresponding storage mirror image id of the virtual machine or a cloud hard disk on a ceph rear end, and calling the ceph api to perform snapshot operation on the storage mirror image;
the mounting module is used for mounting the virtual storage on the backup server medium to the backup agent, creating a mounting point, and writing the data in the snapshot into the medium in the backup server aiming at the ceph storage mirror image snapshot.
The virtual machine data backup method under the openstack cloud platform comprises the following steps: the method comprises the following steps: backup proxy service, ceph client, and backup server.
The backup server is an independent machine, can be a physical machine or a virtual machine, calls an openstack cloud platform to perform api interaction, executes cloud platform authentication, obtains cloud platform parameters and the like.
As shown in fig. 1, the method for synchronizing data between data backup systems of the present invention includes:
(1) installing a ceph client on a backup agent machine, wherein the client is used for connecting an openstack cloud platform for storage; a user configures information such as a ceph server ip address, an authentication mode, an authentication key and the like on a backup proxy server; and writing the storage pool configuration consistent with the cloud platform into the configuration file.
(2) And the backup proxy service calls a cloud platform API interface to acquire parameters such as the starting type, the virtual machine id, the disk mounting information, the network information and the like of the virtual machine to be backed up. According to the starting type and the previously configured cloud platform storage pool information, calling the ceph api to obtain a corresponding storage image of the virtual machine or the cloud hard disk on the ceph back end, and simultaneously calling the ceph api to perform snapshot operation on the storage image and export the snapshot into a data file.
(3) And uploading the exported data file to a backup server for storage.
The specific steps of installing the ceph client in the step (1) comprise:
(a) the backup proxy machine may access the storage network of ceph;
(b) configuring information such as a ceph server ip address, an authentication mode, an authentication key and the like; and writing the storage pool configuration consistent with the cloud platform into the configuration file.
The specific step of calling the ceph api interface in the step (2) comprises the following steps:
(a) the backup proxy service calls an openstack api interface to acquire a virtual machine id to be backed up and a virtual machine starting type;
(b) the backup proxy service calls a script to acquire a storage mirror image of the virtual machine in the ceph storage pool according to the virtual machine id and the starting type;
(c) and the backup proxy service creates a snapshot for the storage image in the ceph storage pool and exports the snapshot.
The specific steps of storing the data file in the step (3) comprise:
(a) the backup server is provided with a medium for storing the backed-up data;
(b) the backup server will scratch a block of storage mount from its own media to the backup agent;
(c) the backup agent uploads the data files to the media on the backup server and saves metadata associated with the backup files.
Claims (10)
1. A virtual machine data backup method under a cloud platform is characterized by comprising the following steps:
(1) the backup proxy service calls an Openstack cloud platform to obtain a virtual machine id and a virtual machine starting type, calls a ceph api interface to obtain a storage mirror image id corresponding to the virtual machine or a cloud hard disk on a ceph rear end, and calls the ceph api to perform snapshot operation on the storage mirror image;
(2) and mounting the virtual storage on the backup server medium to a backup agent, creating a mounting point, and writing the data in the snapshot into the medium in the backup server aiming at the ceph storage mirror image snapshot.
2. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: in the step (1), a ceph client is pre-installed on a backup agent, and the specific step of installing the ceph client comprises the following steps: the backup proxy machine accesses the storage network for ceph.
3. The method for backing up data of the virtual machine under the cloud platform according to claim 2, wherein: the ceph client is used for connecting with the openstack cloud platform and storing the openstack cloud platform at the back end; a backup end user configures a ceph server end ip address, an authentication mode and an authentication key on a backup proxy server; and creating a configuration file, and writing the configuration of the storage pool consistent with the cloud platform into the configuration file.
4. The method for backing up data of the virtual machine under the cloud platform according to claim 2, wherein: in the step (1), according to the starting type and the configured cloud platform storage pool information, a ceph api interface is called to obtain a corresponding storage mirror image id of the virtual machine or the cloud hard disk on a ceph back end.
5. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: in the step (1), the backup proxy service calls an Openstack cloud platform to further obtain the specification of the virtual machine, disk mounting information and network information, and the backup proxy service is used for creating the virtual machine by the opentack.
6. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: and (2) mounting the virtual storage to the backup agent from the backup server medium through the virtual block device.
7. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: in the step (2), the data in the snapshot is written into the medium in the backup server, and the metadata related to the backup file is saved.
8. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: in the step (1), the backup proxy service calls an API (application programming interface) of the Nova component of the Openstack cloud platform.
9. The method for backing up data of the virtual machine under the cloud platform according to claim 1, wherein: and (2) writing the data in the snapshot into a medium in the backup server through a bottom-layer streaming read-write interface.
10. The utility model provides a virtual machine data backup system under cloud platform which characterized in that: comprises a calling module and a mounting module,
the calling module is used for calling an Openstack cloud platform by the backup agent service to acquire a virtual machine id and a virtual machine starting type, calling a ceph api interface to acquire a corresponding storage mirror image id of the virtual machine or a cloud hard disk on a ceph rear end, and calling the ceph api to perform snapshot operation on the storage mirror image;
the mounting module is used for mounting the virtual storage on the backup server medium to the backup agent, creating a mounting point, and writing the data in the snapshot into the medium in the backup server aiming at the ceph storage mirror image snapshot.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011426273.4A CN112486633A (en) | 2020-12-09 | 2020-12-09 | Virtual machine data backup method under cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011426273.4A CN112486633A (en) | 2020-12-09 | 2020-12-09 | Virtual machine data backup method under cloud platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112486633A true CN112486633A (en) | 2021-03-12 |
Family
ID=74940562
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011426273.4A Pending CN112486633A (en) | 2020-12-09 | 2020-12-09 | Virtual machine data backup method under cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112486633A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107391226A (en) * | 2017-07-19 | 2017-11-24 | 郑州云海信息技术有限公司 | The method and apparatus of backup virtual machine under a kind of open storehouse Openstack platforms |
CN111143128A (en) * | 2019-12-24 | 2020-05-12 | 南京壹进制信息科技有限公司 | Openstack cloud host data protection method and system |
CN111930569A (en) * | 2020-08-13 | 2020-11-13 | 上海英方软件股份有限公司 | System and method for backup and recovery of whole machine |
-
2020
- 2020-12-09 CN CN202011426273.4A patent/CN112486633A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107391226A (en) * | 2017-07-19 | 2017-11-24 | 郑州云海信息技术有限公司 | The method and apparatus of backup virtual machine under a kind of open storehouse Openstack platforms |
CN111143128A (en) * | 2019-12-24 | 2020-05-12 | 南京壹进制信息科技有限公司 | Openstack cloud host data protection method and system |
CN111930569A (en) * | 2020-08-13 | 2020-11-13 | 上海英方软件股份有限公司 | System and method for backup and recovery of whole machine |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111143128B (en) | Openstack cloud host data protection method and system | |
CN108255641B (en) | CDP disaster recovery method based on cloud platform | |
CN107566533B (en) | Internal and external network file sharing system based on NAS (network attached storage) | |
CN110309218B (en) | Data exchange system and data writing method | |
CN108667904B (en) | Docker container remote memory volume management method and system | |
CN101808127B (en) | Data backup method, system and server | |
CN110109778B (en) | Large-amount small data file backup method and recovery method | |
CN102012947A (en) | Method and system for online backup of database | |
CN102346697A (en) | Method and system for backing up and recovering Android package (APK) and mobile terminal | |
CN103780417A (en) | Database failure transfer method based on cloud hard disk and device thereof | |
CN103118073B (en) | Virtual machine data persistence storage system and method in cloud environment | |
CN101714107A (en) | Database backup and recovery method and device in ERP system | |
CN108306969A (en) | A kind of intelligent access system and intelligence cut-in method of IDV clouds desktop | |
CN111159105B (en) | System and method for supporting NFS protocol and setting ACL based on mangia sharing mode | |
CN106815096A (en) | A kind of data managing method and device | |
CN104252397A (en) | Realizing method for supporting automatic backup of cloud platform user file | |
CN104572202A (en) | Method for allocating enterprise-level application software under cloud computing | |
CN114564339A (en) | Disk image file cross-platform migration method and system | |
CN111124603A (en) | CD-ROM mounting method, device and related equipment | |
CN115878384A (en) | Distributed cluster based on backup disaster recovery system and construction method | |
CN101937378B (en) | Method for carrying out back-up protection on data of storage equipment and computer system | |
CN103685408A (en) | Server for providing reading base mirror by storage area network, host and method | |
CN110365767B (en) | Single operation and maintenance multi-TCP connection aggregation method of operation and maintenance auditing system | |
CN108259569A (en) | It is a kind of based on IPSAN share storage without acting on behalf of continuous data protection method | |
CN103281407B (en) | A kind of IP address long-distance management system based on Godson cloud terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |