Freezer-Backup Cloud Drive implementation

Source: Internet
Author: User

Here the freezer backup cloud drive is actually called the cinder-backup to implement.


Here are some basic libraries for freezer dependencies

The RESTful API framework underlying the freezer API is implemented based on Falcon. Falcon Introduction:https://falconframework.org/

Freezer Scheduler based on Apscheduler to implement scheduled backup functions


Concrete implementation See: https://github.com/yaoice/freezer-api/commit/4c3d371c28bc4635049bef4c037b7d1d36e9c532


Using the Curl Test API (Freezer API using Keystone V2)

# keystone v2 get tokencurl -s -d  ' {"auth": {"passwordcredentials": {"username":  " Admin "," password ": " cloud "}," Tenantname ": " Demo "} '  -H " content-type: application/ JSON " http://192.168.141.6:5000/v2.0/tokens | python -m json.tool# keystone  v3 get tokencurl -i   -h  "Content-type: application/json"    -d   ' {  ' auth ": {    " Identity ": {      " Methods ":  [" password "],      " password ": {          "user": {           "name":   "admin",           "domain": {  "id":  " Default " },          " Password ": " cloud "        &nbSP;}       }    }  }} '    http:// localhost:5000/v3/auth/tokens ; echo#  get cinder all backups, purely test curl -s -h  " x-auth-token: fced5d5ae9e84009b3dca7972d7c5131 "\         -x  GET        -H  "Content-type: application/json" \          http://192.168.141.6:8776/v2/b232965aeb9c4b3a883ce41b16394e3f/ backups | python -m json.tool        #  Freezer get backup listcurl -s -h  "x-auth-token: fced5d5ae9e84009b3dca7972d7c5131"           -X GET          -H  "Content-type: application/json"          http ://192.168.141.6:9090/v1/cinderbaCkups | python -m json.tool# freezer Creating backup         curl -s -H  "x-auth-token: fd60f3b93b2841e893269b887572c26d"           -X POST         -H  "Content-type: application/json"          -d  ' {' Volume_ ID ": " 438de34e-ef9e-4f4f-b047-600ab6229cc0 "} '            Http://192.168.141.6:9090/v1/cinderbackups# freezer Delete backupcurl -s -h  "x-auth-token:  76744b82dd8c49c490eb7c0ca5f33824 "        -X DELETE         -H  "Content-type: application/json"          http://192.168.141.6:9090/v1/cinderbackups/1ffe9901-43de-490e-b675-0bb92e50c4f4#  Freezer Restore the backup and create a new Volumecurl -s -h  "X-auth-token: 232685c229fd48d4b24629f7748bceda"           -X POST         -H  " Content-type: application/json "          http:// 192.168.141.6:9090/v1/cinderrestores/ed3e05bd-c892-441c-b9c6-226bbb030794# freezer Restore Curl for a volume backup  -s -H  "X-auth-token: 232685c229fd48d4b2a629f7748bceda"          -X POST         -H  "Content-type:  application/json "         -d  ' {" volume_id ": " 496A7DB9-3197-4658-9CC6-EF496F2B0CD1 "} '           http:// 192.168.141.6:9090/v1/cinderrestores/da1b7290-5e56-43ff-b95f-a1c511b305d2


Reference links

http://blog.scottlowe.org/2014/02/19/using-curl-to-interact-with-a-restful-api/




This article is from the "The-way-to-cloud" blog, make sure to keep this source http://iceyao.blog.51cto.com/9426658/1851753

Freezer-Backup Cloud Drive implementation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.