Install Backup Server
Follow one of the following procedures to set up a backup server in your cloud:
- Install Static Backup Server
- Install CloudBoot Backup Server
- Install Static Backup Server with Integrated Storage - proceed to this section if you plan to use OnApp Integrated Storage on static backup servers
Install Static Backup Server
To install a static backup server, run the following procedure. Skip this section if you use CloudBoot. We recommend installing CentOS from the minimal CentOS ISO for static backup servers.
- Add a backup server via the Control Panel user interface:
- Go to your Control Panel > Admin > Settings menu and click the Backup Servers icon.
- Click the Create Backup Server button.
- Fill in the form that appears:
- Label - give your backup server a label
- IP address - enter the backup server IP address (IPv4)
- Backup IP address - add a provisioning network IP address
- Capacity - set the backup server capacity (in GB)
- Backup server zone - select the backup server zone to which this backup server will be assigned.
- Move the Enabled slider to the right to enable the backup server.
- Click the Add Backup Server button.
Update your server:
# yum update
Download the OnApp repository:
# rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.4.noarch.rpm
Install the OnApp Backup Server installer package:
# yum install onapp-bk-install
Check and set the backup server default settings:
# vi /onapp/onapp-bk.conf
Run the installer. It is recommended to download Base, Load Balancer, and CDN templates while running the installer. You may rerun the installer later with the
-t
option.# sh /onapp/onapp-bk-install/onapp-bk-install.sh
Сonfigure the backup server for your cloud. This step is also required for the SNMP statistics receiver configuration:
# /onapp/onapp-bk-install/onapp-bk-config.sh -h <CP_HOST_IP> -p <BK_HOST_IP>
Install SSH keys for the backup server by running the following script on the Control Panel server:
# ssh-copy-id -i /home/onapp/.ssh/id_rsa.pub root@BS_HOST_IP
Perform the following step (9) if you plan to deploy VSs from OVA.
Mount the locations for OVA. If you enable building VSs from OVAs in your cloud, you should mount the source location to which OVA is uploaded on CP with a destination location where OVA is stored on a backup server. The location is preconfigured in the onapp.yml config file:
Source Path (
ova_path
) - specifies the location where OVAs are downloaded/uploaded on the Control Panel server. By default the location is/data
.Destination Path (
ova_path
) - specifies the location where OVAs are stored on backup servers. By default the location is/data
.
To mount the locations:
Add locations (e.g. /data) to /etc/exports on the Control Panel server and then restart the nfs service:
# /data 192.168.10.0/24(rw,no_root_squash)
Add locations to /etc/rc.local on the backup server and run them manually on the command line (in this example we are mounting from 192.168.10.101):
# mkdir -p /data && mount -t nfs 192.168.10.101:/data /data
Install CloudBoot Backup Server
CloudBoot backup servers are CloudBoot KVM compute resources that can be be used as backup servers. Follow the step-by-step instructions provided in this section to configure CloudBoot backup servers in your cloud.
To create a CloudBoot backup server:
- Add a backup server via the Control Panel user interface:
- Go to your Control Panel > Admin > Settings menu and click the Backup Servers icon.
- Click the Create Backup Server button.
- Fill in the form that appears:
- Label - give your backup server a label
- IP address - enter the backup server IP address (IPv4)
- Backup IP address - add a provisioning network IP address
- Capacity - set the backup server capacity (in GB)
- Backup server zone - select the backup server zone to which this backup server will be assigned.
- Move the Enabled slider to the right to enable the backup server.
- Click the Add Backup Server button.
Update CloudBoot and CP server RPMs:
# yum update onapp-store-install yum update onapp-cp-install
Configure CloudBoot settings:
# /onapp/onapp-store-install/onapp-store-install.sh
Create a new CloudBoot compute resource: at the first step of the creation wizard, select the type - Backup (CloudBoot Provisioning and Backup Resource). Refer to the Create CloudBoot Compute Resource page of this guide for details.
- Go to your Control Panel > Admin > Settings menu and then click the Compute Resources icon.
- Click the Add New CloudBoot Compute Resource button.
- In the wizard menu, click Backup (CloudBoot Provisioning and Backup Resource).
Select right MAC address of it.
Fill in the form that appears:
- Label - give the compute resource a name
- Pxe IP address - select an IP address for this compute resource from the address pool available
- Enabled - move the slider to the right to allow VSs to be installed/booted on this compute resource
- Compute Zone - select the compute zone, to which this compute resource will be assigned, from the drop-down list
- Custom Config - specify any custom commands you want to run when compute resource is booted
At this step, specify the Backup Server properties:
- Label - give your backup server a label
- IP address - enter the IP address of a Compute resource you have created at step 1
- Backup IP address - add a provisioning network IP address
- Capacity - set the backup server capacity (in GB)
- Then, you shouldn't assign any drive, but it needs right NIC to be applied to the storage network.
After that, assign your backup server to the backup server zone. If you want to attach LVM-based storage and create backups, you should also add the IP address of the KVM Compute resource added in step 1 in the 'Backup IP address' field of each of your compute resources.
Further steps:
- Format and mount the local storage:
- SSH to the backup server
Format the storage with your preferred filesystem type, e.g.:
# mkfs.ext4 /dev/sda
Create a directory for backups if it does not exist
# mkdir /backupstorage
Mount the storage to /onapp/backups:
# mount /dev/sda /backupstorage
Create a directory for storing templates:
# mkdir /backupstorage/templates
Create a directory for storing backups:
# mkdir /backupstorage/backups
Create symbolic links in /onapp:
# ln -s /backupstorage/backups /onapp/backups # unlink /onapp/templates # ln -s /backupstorage/templates /onapp/templates # ln -s /onapp/tools/recovery /data
Add the following to custom config file:
# mkdir /backupstorage # mount /dev/sda /backupstorage # ln -s /backupstorage/backups /onapp/backups # unlink /onapp/templates # ln -s /backupstorage/templates /onapp/templates # ln -s /onapp/tools/recovery /data
- Another example of the custom config files:
If you have a separate partition for backups and templates (/dev/sda1 and /dev/sda2):
# mkdir /backupstorage # mkdir /backupstorage/templates # mkdir /backupstorage/backups # mount /dev/sda1 /backupstorage/backups # mount /dev/sda2 /backupstorage/templates # ln -s /backupstorage/backups /onapp/backups # unlink /onapp/templates # ln -s /backupstorage/templates /onapp/templates
If you current array is detected as /dev/sda1 and currently everything is located in /onapp within templates and backup directories within:
# mkdir /backupstorage # mount /dev/sda1 /backupstorage/ # ln -s /backupstorage/backups /onapp/backups # unlink /onapp/templates # ln -s /backupstorage/templates /onapp/templates
- Update the database so that the location of the templates is known:
Find the database password:
# cat /onapp/interface/config/database.yml |grep password
Open the onapp database in MySQL:
# mysql -p # use onapp;
Find the ID of the backup server:
# select * from backup_servers;
For all of the templates, set the required
backup_server_id
:# update templates set backup_server_id='[your_id]';
To download the base templates during the installation to your Control Panel, download and run the following script:
# wget http://downloads.repo.onapp.com/get_template.sh # /bin/sh get_template.sh
Install Static Backup Servers with Integrated Storage
Before you proceed
There are the following limitations for installation of static backup servers with Integrated Storage:
To install static backup server with Integrated Storage:
Update your server:
# yum update
Download the OnApp repository:
# rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.4.noarch.rpm
Install the OnApp compute resource installer package:
# yum install onapp-bk-install
Run the OnApp compute resource installer script:
# /onapp/onapp-bk-install/onapp-bk-install.sh -d
Configure the compute resource for your cloud. This step is also required for the SNMP statistics receiver configuration:
# /onapp/onapp-bk-install/onapp-bk-config.sh -h <CP_HOST_IP> -p <BK_HOST_IP>
Update the authorized_keys file by running the following script on the Control Panel server:
# ssh-copy-id -i /home/onapp/.ssh/id_rsa.pub root@BS_HOST_IP
If you do not have a dedicated backup server, you must mount your template and backup repositories to compute resources. If your template and backup repositories are located on the Control Panel server, you can mount them as follows:
Add locations to /etc/exports on the Control Panel server and then reboot:
# /onapp/templates 192.168.10.0/24(rw,no_root_squash) # /onapp/backups 192.168.10.0/24(rw,no_root_squash)
Add locations to /etc/rc.local on the compute resource and run them manually on the command line (in this example, we are mounting from 192.168.10.101):
# mkdir -p /onapp/backups && mount -t nfs 192.168.10.101:/onapp/backups /onapp/backups # mkdir -p /onapp/templates && mount -t nfs 192.168.10.101:/onapp/templates /onapp/templates
- After you have installed integrated storage on static backup server, configure your backup server.
Edit
/tmp
mount point entry into/etc/fstab
and replace your current entry with the following:tmpfs /tmp tmpfs size=1024m,nosuid,nodev 0 0
- Reboot the backup server to complete the installation.