温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

OpenStack实践(六):Cinder模块Backup and Restore Volume

发布时间:2020-07-23 19:00:12 来源:网络 阅读:892 作者:loong576 栏目:云计算

环境说明:

主机名
操作系统版本
IP地址
说明
centos7
centos7
172.27.9.181NFS服务器,挂载点为/backup
openstack-controllerUbuntu 16.04.5172.27.34.37openstack控制节点,本地nfs挂载点为cinder_backup



ubuntu安装详见:Ubuntu16.04.5以lvm方式安装全记录

openstack安装详见:OpenStack实践(一):Ubuntu16.04下DevStack方式搭建p版OpenStack

nfs服务器搭建详见:Centos7下NFS服务器搭建及客户端连接配置


目标:

  1. 备份卷vol-002至远程nfs服务器;

  2. 从nfs服务器上恢复已备份的卷;


1.修改配置文件

修改控制节点的cinder.conf文件

stack@openstack-controller:~$ view /etc/cinder/cinder.conf
backup_driver = cinder.backup.drivers.nfs
backup_mount_point_base = /cinder_backup
backup_share = 172.27.9.181:/backup


2.启动备份服务

手动启动cinder-backup服务

root@openstack-controller:~# source /opt/stack/devstack/openrc admin admin
root@openstack-controller:/# /usr/bin/python /usr/local/bin/cinder-backup --config-file /etc/cinder/cinder.conf

挂载点查看

OpenStack实践(六):Cinder模块Backup and Restore Volume

远程的172.27.9.181:/backup目录被挂载到本地/cinder_backup/25456d92e2f8d55a830c3f5211266302


3.查看volume

查看被backup的卷

OpenStack实践(六):Cinder模块Backup and Restore Volume

将要被backup的卷vol-002已经被连接到实例cirros06上。


4.执行备份

root@openstack-controller:~# cinder backup-create vol-002 --force

OpenStack实践(六):Cinder模块Backup and Restore Volume

由于vol-002已经被连接到实例,所以强制备份。


5.查看已备份的卷

备份卷查看

root@openstack-controller:~# cinder backup-list

OpenStack实践(六):Cinder模块Backup and Restore Volume

nfs共享目录查看

OpenStack实践(六):Cinder模块Backup and Restore Volume

目标1完成


6.恢复卷

root@openstack-controller:~# cinder backup-restore 34ff4ba3-e175-481a-b578-800d4948dcb7

OpenStack实践(六):Cinder模块Backup and Restore Volume

查看正在恢复的卷

OpenStack实践(六):Cinder模块Backup and Restore Volume

已恢复

OpenStack实践(六):Cinder模块Backup and Restore Volume

目标2完成。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI