Storware backup openstack
Install Centos Stream 8: Minimal Server + Standard
Update:
# dnf check-update
# dnf update
Staging Space Configuration
Check available disk device:
[root@storwer ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 32G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 1.5G 0 part /boot ├─sda3 8:3 0 22G 0 part / └─sda4 8:4 0 8G 0 part [SWAP] sdb 8:16 0 128G 0 disk sr0 11:0 1 897M 0 rom |
Format disk device:
mkfs.xfs -K -f /dev/sdb |
Make new directory for mount point
mkdir /vprotect_data |
Mount /dev/sdb to /vprotect_data
mount /dev/sdb /vprotect_data |
Edit /etc/fstab file
vi /etc/fstab |
Add following
/dev/sdb /vprotect_data xfs defaults 0 0 |
Save and quit
Mount all filesystems mentioned in fstab
mount -a |
Configure Mariadb repository:
Check http://mirror.mariadb.org/yum/ for latest available versions for centos8-amd64 (you’ll need to enter the directory to check) – 10.10.2 in this guide
Reference:
Edit or create file /etc/yum.repos.d/mariadb.repo
vi /etc/yum.repos.d/mariadb.repo |
Add following
[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.10.2/centos8-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 |
Install Storware
bash < <(curl -s https://repo.storware.eu/storware/sbr-local-install.sh) |
Reference:
Prepare backup directories
mkdir -p /vprotect_data/backups mkdir -p /vprotect_data/staging mkdir -p /vprotect_data/import mkdir -p /vprotect_data/mount chown vprotect:vprotect -R /vprotect_data systemctl restart vprotect-node |
Configure CEPH RBD
yum install epel-release rpm –import ‘https://download.ceph.com/keys/release.asc’ yum install https://download.ceph.com//rpm-quincy/el8/noarch/ceph-release-1-1.el8.noarch.rpm yum install rbd-nbd ceph-common |
When done, open your browser and go to https://<your_server_ip_address>/
Default user and password are admin and vPr0tect
Configure new administration user
Left menu: Access Management > Users
Click ‘+Create’ button
First name: PSI
Last name: Admin
Login: psi-admin
Password: p4nd4ta123#
Retype password: p4nd4ta123#
Disable UI tour after login
Groups: Select All
Click ‘Save’ button
Logout then login with psi-admin
Configure Default Backup Destination
Left menu: Backup Destinations
Click Create Backup Destination drop down button then select ‘File System (Synthetic)’
General Section
Name: Default Backup Destination
Enable ‘Set this backup destination as default’
Choose Node Configuration: Default Config
File System (Synthetic) Settings
Backup destination paths: /vprotect_data/backups
Click ‘Save’ button
Configure Node Configuration
Left menu: Nodes > Node Configurations
Click Default Config > General tab
Name: Node1 Configuration
Export path (staging space): /vprotect_data/staging
Restore path for import tasks: /vprotect_data/import
Restore path for mount tasks: /vprotect_data/mount
Backup destinations tab
Select ‘Default Backup Destination’ (was created in previous step)
Click ‘Save’ button
Backup internal database
Left menu: Dashboard
Click on Configuration wizard and go to step 6
Choose node configuration: Node1 Configuration
Click ‘Next’ button
***
SSH Host: <your_server_ip_address>
SSH Port: 22
Click ‘+Create Credential’ button
Name: <your_server_id_address>
User: <your_server_root_or_sudo_user>
Password: <user_password>
Retype password: <user_password>
Click ‘Save’ button
Click ‘Next’ button
***
Select primary backup destination: Default Backup Destination
Click ‘Next’ button
Choose time of day: 12:00 AM
Click ‘Next’ button
Click ‘Run database backup now’ button
Click ‘Finish’ button
Configure Storage Provider
Left menu: Storage > Infrastructure: Storage Providers tab
Click ‘+Create’ button
Type: Ceph RBD
Name: Ceph Storage Providers
User: admin
Node Configuration: Node1 Configuration
Ceph keyring file contents:
Copy and paste from admin, cinder, glance, and nova keyring files of your CEPH cluster
[client.admin] key = AQClu79jCwh7HBAAILT/37WTQTMU//WNxTPkbw== caps mds = “allow *” caps mgr = “allow *” caps mon = “allow *” caps osd = “allow *” [client.cinder] key = AQCwxL9jMJ0rCxAARUUtEboRfpx/McsEvHydqA== [client.glance] key = AQCvxL9ju9O6LhAA93zfCtKKYmMngUQtxLLiTg== [client.nova] key = AQCxxL9jz/KAABAAWWyQYNhRVt7JJeNfCogCyw== |
***
If deploying ceph using cephadm, file /etc/ceph/ceph.client.admin.keyring is encrypted:
sudo ceph-authtool /etc/ceph/ceph.client.admin.keyring –list
Ceph configuration file contents:
***
Copy and paste from ‘ceph.conf’ file of your CEPH cluster
[global] cluster network = 10.6.11.0/24 fsid = 1d1a8d64-af52-47b2-a6bd-c31b89b8cf47 mon host = [v2:10.6.11.10:3300,v1:10.6.11.10:6789] mon initial members = ceph osd crush chooseleaf type = 0 osd pool default crush rule = -1 public network = 10.6.11.0/24 |
Click ‘Save’ button and choose to synchronize inventory when asked
Configure Openstack Backup
Left menu: Virtual Environments > Infrastructure: Hypervisor Manager tab
Click ‘+Create’ button
Choose type: OpenStack
URL: <your_keystone_internal_endpoint_url>
Region: <your_openstack_cluster_region_name>
Choose impot/export mode: SSH transfer
Choose node configuration: Node1 Configuration
Authentication domains:
Name: default authentication domain
User: admin
Default project name: admin
Domain ID: default
Password: <your_openstack_admin_password>
Click ‘Save’ button and confirm when being asked to run inventory synchronization
Synchronization will be failed, no worry, let’s continue to next steps
Login to your Storware server CLI
Modify /etc/hosts file
vi /etc/hosts
Add all hypervisor IP addresses and hostnames
<hypervisor_ip_address> <hypervisor_hostname>
Save and exit
Try to ping <hypervisor_hostname>
ping -c 3 <hypervisor_hostname>
Create private and public key for vprotect user
chown vprotect:vprotect -R /opt/vprotect cd /opt/vprotect sudo -u vprotect ssh-keygen -t rsa -m PEM |
Upload vprotect user public key to KVM host
sudo -u vprotect ssh-copy-id -i /opt/vprotect/.ssh/id_rsa.pub <user_with_sudo>@<hypervisor_hostname> |
Test connection to <hypervisor_hostname> with being asked for password
sudo -u vprotect ssh <user_with_sudo>@<hypervisor_hostname> hostname |
It will returns <hypervisor_hostname>
Configure Hypervisor
Login to your hypervisor
Create qemu-img.sh and virsh.sh
sudo mkdir /opt/vprotect cd /opt/vprotect sudo touch qemu-img.sh sudo touch virsh.sh sudo chmod +x ./* cd /usr/bin/ sudo ln -s /opt/vprotect/virsh.sh virsh sudo ln -s /opt/vprotect/qemu-img.sh qemu-img |
cd /opt/vprotect
sudo vi /opt/vprotect/qemu-img.sh
#!/usr/bin/bash id_nova_compute=$(docker ps | grep nova_libvirt | awk ‘{print $1}’) command=” $1 $2 $3 $4 $5 $6″ docker exec -u root $id_nova_compute qemu-img $command |
sudo vi /opt/vprotect/virsh.sh
#!/usr/bin/bash id_nova_compute=$(docker ps | grep nova_libvirt | awk ‘{print $1}’) command=” $1 $2 $3 $4 $5 $6″ docker exec -u root $id_nova_compute virsh $command |
Logout when done
Return to Storware GUI
Configure Hypervisors
Left menu: Virtual Environments > Infrastructure: Hypervisors tab
Click one of hypervisor from the list
Host: <hypervisor_hostname>
Username: <user_with_sudo>
SSH key path: /opt/vprotect/.ssh/id_rsa
Click ‘Save’ button
Configure Storage
Left menu: Virtual Environments > Infrastructure: Storage tab
Click on _DEFAULT_
Storage pool name: volumes/cinder
Click ‘Save’ button
Configure Clusters
Left menu: Virtual Environments > Infrastructure: Clusters tab
Click on ‘nova’
Select storage provider to ceph storage
Click ‘Save’ button
Now return to Hypervisor Managers and try to synchronize inventory again
Check available VMs
Configure Backup SLAs
Left menu: Virtual Environments > Backup SLAs: Policies tab
Click ‘+Create’ button
Name: Default Backup Policy
Enable Scheduled backup enabled
Disable Auto remove non-present Virtual Environments
Virtual Environments
Check all VMs
Click on ‘Create Schedule’
Name: Daily Backup
Choose days: Monday – Sunday
Click ‘Save’ button
Now we can backup VMs
Left menu: Virtual Environments > Instances