OpenStack practice (6): Cinder module Backup and Restore Volume
Environmental Description:
hostname
operating system version
IP address
description
centos7
centos7
172.27.9.181NFS server with mount point/backup
openstack-controllerUbuntu 16.04.5172.27.34.37openstack control node, local nfs mount point is finder_backup
Ubuntu installation details: Ubuntu 16.04.5 lvm installation full record
Openstack installation details: OpenStack practice (1): DevStack under Ubuntu 16.04 to build p version of OpenStack
For details of NFS server setup, see: NFS server setup and client connection configuration under Centos7
Objective:
Backup volume vol-002 to remote nfs server;
Restore backed up volumes from nfs servers;
1. modify the configuration file
Modify the cinder.conf file of the control node
stack@openstack-controller:~$ view /etc/cinder/cinder.confbackup_driver = cinder.backup.drivers.nfsbackup_mount_point_base = /cinder_backupbackup_share = 172.27.9.181:/backup
2. Start backup service
Manually start the cinder-backup service
root@openstack-controller:~# source /opt/stack/devstack/openrc admin adminroot@openstack-controller:/# /usr/bin/python /usr/local/bin/cinder-backup --config-file /etc/cinder/cinder.conf
Mount Point View
The remote directory 172.27.9.181:/backup is mounted locally/finder_backup/25456d92e2f8d55a830c3f5211266302
3. View Volume
View backed up volumes
Volume vol-002 to be backed up is already attached to instance cirros06.
4. perform a backup
root@openstack-controller:~# cinder backup-create vol-002 --force
Force backup because vol-002 is already connected to the instance.
5. View backed up volumes
Backup Volume View
root@openstack-controller:~# cinder backup-list
nfs Shared Directory View
Goal 1 completed
6. recovery volume
root@openstack-controller:~# cinder backup-restore 34ff4ba3-e175-481a-b578-800d4948dcb7
View recovering volumes
has resumed
Objective 2 completed.