cinder backup

时间:2023-02-26 09:35:04

cinder 备份提供的驱动服务有:

cinder/backup/drivers/ceph.py:def get_backup_driver(context):
cinder/backup/drivers/glusterfs.py:def get_backup_driver(context):
cinder/backup/drivers/google.py:def get_backup_driver(context):
cinder/backup/drivers/nfs.py:def get_backup_driver(context):
cinder/backup/drivers/posix.py:def get_backup_driver(context): //

"""Implementation of a backup service that uses a posix filesystem as the
backend."""

cinder/backup/drivers/swift.py:def get_backup_driver(context):
cinder/backup/drivers/tsm.py:def get_backup_driver(context):

cinder 驱动服务的配置在cinder.conf文件中

backup_driver=cinder.backup.drivers.swift

Ceph的配置

backup_driver = cinder.backup.drivers.ceph

backup_ceph_conf=/etc/ceph/ceph.conf
backup_ceph_user = cinder
backup_ceph_chunk_size =
backup_ceph_pool = backups
backup_ceph_stripe_unit =
backup_ceph_stripe_count =

Swift的配置

backup_driver = cinder.backup.drivers.swift

backup_swift_url = http://localhost:8080/v1/AUTH
backup_swift_auth = per_user
backup_swift_user = <None>
backup_swift_key = <None>
backup_swift_container = volumebackups
backup_swift_object_size = 52428800
backup_swift_retry_attempts = 3
backup_swift_retry_backoff = 2
backup_compression_algorithm = zlib

代码分析

backup(/cinder/backup/)
/cinder/backup/__init__.py:指定并导入cinder-backup的API类;
/cinder/backup/api.py:处理所有与卷备份服务相关的请求;

api.py调用 rpcapi.py -再到 manager.py 到 driver.py 到 具体的drivers/

class API(base.Base):卷备份管理的接口API,主要定义了卷的备份相关的三个操作的API:
create:实现卷的备份的建立;
delete:实现删除卷的备份;
restore:实现恢复备份;
这三个操作都需要通过backup_rpcapi定义的RPC框架类的远程调用来实现; /cinder/backup/driver.py:所有备份驱动类的基类; class BackupDriver(base.Base):所有备份驱动类的基类; /cinder/backup/manager.py:卷备份的管理操作的实现; class BackupManager(manager.SchedulerDependentManager):块存储设备的备份管理;继承自类 SchedulerDependentManager;
主要实现的是三个远程调用的方法:
create_backup:实现卷的备份的建立(对应api.py中的creat方法);
restore_backup:实现恢复备份(对应api.py中的restore方法);
delete_backup:实现删除卷的备份(对应api.py中的delete方法); /cinder/backup/drivers/ceph.py:ceph备份服务实现;
class CephBackupDriver(BackupDriver):Ceph对象存储的Cinder卷备份类;这个类确认备份Cinder卷到Ceph对象存储系统; /cinder/backup/drivers/swift.py:用swift作为后端的备份服务的实现;
class SwiftBackupDriver(BackupDriver):用swift作为后端的备份服务的各种管理操作实现类; /cinder/backup/drivers/tsm.py:IBM Tivoli存储管理(TSM)的备份驱动类;
class TSMBackupDriver(BackupDriver):实现了针对TSM驱动的卷备份的备份、恢复和删除等操作;
/cinder/backup/chunkeddriver.py 增量备份

具体操作

创建卷
cinder create --display-name volume1 1
备份卷
cinder backup-create --container volumes_backup --display-name backuptoswift volume1
恢复卷
cinder backup-restore --volume-id cb0fe233-f9b6-4303-8a61-c31c863ef7ce volume1
删除卷
cinder backup-delete 1b9237a4-b384-4c8e-ad05-2e2dfd0c698c

Openstack 中cinder backup三种backend的对比

http://blog.csdn.net/wytdahu/article/details/45246095

cinder backup的更多相关文章

  1. cinder backup ceph的配置和使用

    Backup 是将 volume 备份到别的地方(备份设备),将来可以通过 restore 操作恢复. 初看 backup 功能好像与 snapshot 很相似,都可以保存 volume 的当前状态, ...

  2. Cinder Backup备份

    cinder 备份提供了三种驱动服务: Ceph,TSM,Swift 其中默认备份驱动服务为swift cinder 驱动服务的配置在cinder.conf文件中 backup_driver=cind ...

  3. Backup Volume 操作 - 每天5分钟玩转 OpenStack(59)

    本节我们讨论 volume 的 Backup 操作. Backup 是将 volume 备份到别的地方(备份设备),将来可以通过 restore 操作恢复. Backup VS Snapshot 初看 ...

  4. OpenStack Cinder源代码流程简析

    版权声明:本博客欢迎转载,转载时请以超链接形式标明文章原始出处!谢谢! 博客地址:http://blog.csdn.net/i_chips 一.概况 OpenStack的各个模块都有对应的client ...

  5. openstack的glance、nova、cinder使用ceph做后端存储

    块设备与 OPENSTACK 通过 libvirt 你可以把 Ceph 块设备用于 OpenStack ,它配置了 QEMU 到 librbd 的接口. Ceph 把块设备映像条带化为对象并分布到集群 ...

  6. OpenStack IceHouse版cinder模块新添加功能

    感谢朋友支持本博客.欢迎共同探讨交流.因为能力和时间有限.错误之处在所难免,欢迎指正! 假设转载,请保留作者信息. 博客地址:http://blog.csdn.net/gaoxingnengjisua ...

  7. O059、Backup Volume 操作

    参考https://www.cnblogs.com/CloudMan6/p/5662236.html   BackUp是将Volume备份到别的地方(备份设备),将来可以通过restore操作恢复. ...

  8. Cinder 架构分析、高可用部署与核心功能解析

    目录 文章目录 目录 Cinder Cinder 的软件架构 cinder-api cinder-scheduler cinder-volume Driver 框架 Plugin 框架 cinder- ...

  9. 理解 OpenStack Swift (1):OpenStack &plus; 三节点Swift 集群&plus; HAProxy &plus; UCARP 安装和配置

    本系列文章着重学习和研究OpenStack Swift,包括环境搭建.原理.架构.监控和性能等. (1)OpenStack + 三节点Swift 集群+ HAProxy + UCARP 安装和配置 ( ...

随机推荐

  1. T-SQL—理解CTEs

    在推出SQLServer2005之后,微软定义了一个新的查询架构叫做公共表表达式--CTE.CTE是一个基于简单查询的临时结果集,在一个简单的插入.更新.删除或者select语句的执行范围内使用.再本 ...

  2. Mac下安装Node&period;js

    今天介绍一下Mac下Node.js的下载安装方法,后面我们安装Bootstrap.Angurlar和jQuery等都是通过Node.js的npm方式的. 1.在必应中搜索“node.js mac”,第 ...

  3. js中的闭包之我理解

    闭包是一个比较抽象的概念,尤其是对js新手来说.书上的解释实在是比较晦涩,对我来说也是一样. 但是他也是js能力提升中无法绕过的一环,几乎每次面试必问的问题,因为在回答的时候.你的答案的深度,对术语的 ...

  4. 或许是python yield最好的答案 ?

    地址:http://pyzh.readthedocs.org/en/latest/the-python-yield-keyword-explained.html#yield 译者: hit9 原文: ...

  5. AngularJS&plus;requireJS项目的目录结构设想

    AngularJS+requireJS项目的目录结构设想 准备用AngularJS + require.js 作为新项目的底层框架,以下目录结果只是一个初步设想: /default    放页面,不过 ...

  6. &lbrack;Android&rsqb;Android焦点流程代码分析

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/7286503.html 通过View的View::focusSe ...

  7. 四种方式实现子goroutine与主线程的同步

    如何实现子goroutine与主线程的同步 第一种方式: 这种方式很太死板,就不演示了. 第二种方式:使用 channel机制,每个 goroutine传一个 channel进去然后往里写数据,在再主 ...

  8. 【RL-TCPnet网络教程】第15章 RL-TCPnet之创建多个TCP连接

    第15章     RL-TCPnet之创建多个TCP连接 本章节为大家讲解RL-TCPnet的TCP多客户端实现,因为多客户端在实际项目中用到的地方还挺多,所以我们也专门开启一个章节做讲解.另外,学习 ...

  9. angular和vue的差别

    一angular是mvvm框架, 而vue是一个渐进式的框架, 相当于view层, 都有双向数据绑定, 但是angular中的双向数据绑定是基于脏检查机制, vue的双向数据绑定是基于ES5的gett ...

  10. Mybatis insert时返回自增id

    SelectKey在Mybatis中是为了解决Insert数据时不支持主键自动生成的问题,他可以很随意的设置生成主键的方式. 详细看这里:http://www.cnblogs.com/SimonHu1 ...